Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

gnuplot does not respect .Xresources or .Xdefaults

211 views
Skip to first unread message

Awhan Patnaik

unread,
Jan 4, 2011, 7:44:46 AM1/4/11
to
running version 4.4 patchlevel 2 on archlinux. my .Xresources has the
following:

*background: black

amongst other settings. however gnuplot does not seem to respect these
settings. i also set up an .Xdefaults file as per the gnuplot man page
but to no avail. yes i did do an ``xrdb -merge" before testing.

however when i plot anything from within gnu octave i always get the
gnuplot background colors right as per my Xresources. as far as i know
gnu octave uses gnuplot. the white background becomes too glaring at
times.

i even attempted sticking the following line in my .gnuplot

set object 1 rectangle from screen 0, screen 0 to screen 1, screen 1
behind fc rgbcolor "#7f7f7f"

but recently i found out that this interferes badly when i tried to
construct an inset plot so i would like to be able to specify
resources in Xresources/Xdefaults. plz help

Péter Juhász

unread,
Jan 4, 2011, 9:18:21 AM1/4/11
to

The settings in Xresources/Xdefaults apply only if you use the x11
terminal. The default is the wxt terminal, so you have to use an
explicit "set term x11" in your gnuplot session. You can put that
command in your ~/.gnuplot file if you want.

Péter Juhász

Awhan Patnaik

unread,
Jan 4, 2011, 3:28:13 PM1/4/11
to
On Jan 4, 7:18 pm, Péter Juhász <peter.juhas...@gmail.com> wrote:
>
> The settings in Xresources/Xdefaults apply only if you use the x11
> terminal. The default is the wxt terminal, so you have to use an
> explicit "set term x11" in your gnuplot session. You can put that
> command in your ~/.gnuplot file if you want.
>
> Péter Juhász

oh that's very stupid of me to not have realized it ... thanks so much
for correcting me. may i ask what should i do if i want to continue
using the wxt-terminal?

thanks again :)

Péter Juhász

unread,
Jan 5, 2011, 3:52:28 AM1/5/11
to

The ability to set a background color is terminal-dependent. Some
terminals (x11, jpeg, ...) allow it, some don't because it wouldn't
make sense anyway (printers, pen plotters), and some should allow it,
but don't in practice. Unfortunately the wxt terminal falls in the
latter camp.

For the time being, stick with the colored rectangle behind the graph.
If you're using multiplot, you should unset the rectangle after the
first plot. Or even better, redefine it as

set object 1 rectangle from graph 0, 0 to graph 1, 1 behind fc
rgbcolor "#7f7f7f"

so that it blanks out the area within the new graph only.

Péter Juhász

0 new messages