Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#894 4.4.0 x11 plots have no border, axes, tics, or plot key

closed-works-for-me
nobody
Drivers (161)
5
2010-06-29
2010-05-05
No

I compiled 4.4.0 from the source tarball using gcc 4.2.4 on an OpenBSD 4.6-stable i386 laptop.
Plots using the x11 terminal show only the plot curves and the sample
lines for the key -- there are no borders, axes, tics, or text in the key! Attached is an X screen dump
(converted to a jpeg image) showing this. This behavior (bug) was NOT
present in gnuplot 4.2.6 (same gcc, same OS release, same platform, same ~/.gnuplot and ~/.Xdefaults),
and is NOT present for 4.4.0 plots using the postscript terminal).

Attachments: I am attaching 5 files:
* X-screen-dump.jpeg = X screen dump of gnuplot x11 window showing plot
without borders, axes, tics, or text in the key
*

Discussion

  • X screen dump (converted to jpeg with netpbm) showing offending X window

     
    Attachments
  • transcript of configure/compile/install process starting from 4.4.0 tarball

     
    Attachments
  • transcript of gnuplot session showing 'show version long' output and command which produced the buggy x11 plot

     
  • ~/.gnuplot initialization file (I don't think anything here is relevant, but am including it just in case...)

     
    Attachments
  • ~/.Xdefaults file (gnuplot X resources set at lines 54-55; again nothing fancy, just included for completeness...)

     
    Attachments
  • Continuing the bug-report text which sourceforge's @(*&#^%(*@&$#@ web interface truncated.....

    There are 5 attached files:
    * X-screen-dump.jpeg shows a plot exhibiting the bug
    * build.log transcript of how I compiled/installed this gnuplot from 4.4.0 tarball
    * version-and-bug.transcript shows output of 'show version long' and also shows command I typed to produce
    the plot-with-bug window
    * home-.gnuplot my ~/.gnuplot initialization file (I don't think anything there is related to the
    bug; indeed the buggy plot is unchanged if I rename ~/.gnuplot to ~/.foo;
    I'm only including this file for completeness)
    * home-.Xdefaults my ~/.Xdefaults file (on this machine I start X by typing 'startx&;logout' at a shell prompt);
    again I don't think there's anything relevant here, and am only including this file
    for completeness -- the only gnuplot resources are turning on reverse video and
    changing line3Color.

    Finally, I'd like to emphasize again that this bug (absence of border, axes, tics, labels to go with ticks,
    and text in plot key) did NOT occur for gnuplot 4.2.4 on the same machine, nor does it occur for non-x11
    plots generated with 4.4.0. In particular, 4.4.0 postscript plots are fine.

    For any questions, my E-mail is jthorn@astro.indiana-zebra.edu (remove -animal spam-trap) .

     
  • Ethan Merritt
    Ethan Merritt
    2010-05-05

    In your screenshot, the background of the plot is black. This is not the default, and is not set in your .Xdefaults file, so I imagine it must be set by some system .Xdefaults files. I would look there for the cause of the problem. The search path used to look for a system .Xdefaults file may well have changed between 4.2 and 4.4.

    Gnuplot does not query or use a reverse-video X resource. Not sure where that came from. Were you expecting it to make the foreground color white rather than black? That won't happen, or at least gnuplot itself will not do it. You would need to set an explicit change in linecolour for the borders, just as you did for linetype 3. Try:
    gnuplot*bordercolor: white
    gnuplot*line3Color: light sky blue

     
  • Ethan Merritt
    Ethan Merritt
    2010-05-05

    Oops. I must correct myself. Gnuplot does look for an Xresource gnuplot*reverseVideo. It is listed in the docs as an option for monochrome displays, so I had not realized it might be relevant to colors.

     
  • Ethan Merritt
    Ethan Merritt
    2010-05-05

    Sigh. And I can't type either. The options are case sensitive. So you need:
    gnuplot*borderColor: white

     
  • My .Xdefaults file sets gnuplot*reverseVideo: on at line 54. What's interesting is that if I rename this,
    % mv ~/.Xdefaults ~/no-.Xdefaults
    then kill & restart my X server, then gnuplot behaves normally again
    (i.e., plots DO have borders, tics, tic labels, & plot-key labels), but with a white background.

    So it looks like that resource setting (on line 54 of my ~/.Xdefaults) is indeed having an effect
    (i.e. that resource file is indeed in the X search path).

    What I wanted to accomplish with that resource setting (and what it did accomplish with 4.2.4
    and prior gnuplots -- the date stamp on my ~/.Xresources is in June 2001, and the reverseVideo
    setting also appears in older ~/.Xdefaults files I have around with datestamps as far back as May 1994)
    was indeed to have gnuplot (with 'set term x11' in effect) display with black background & white foreground
    (e.g., for borders/ticks), and the usual "colored" color sequence for other things (modified by my tweak
    to line3Color).

     
  • Sorry, that last comment was indeed from me, I neglected to log back in at sourceforge
    after killing & restarting X (& hence killing & restarting firefox & hence wiping all my cookies)...

     
  • Ethan Merritt
    Ethan Merritt
    2010-05-06

    My best guess is still that the changed behaviour is due to a different search path for the system-wide Xdefaults. Try setting the environmental variable XAPPLRESDIR to point to a directory known to contain the complete app-defaults file for gnuplot. The 4.4 installation scripts place a copy in /usr/local/share/gnuplot/4.4/app-defaults, with the expectation that distro-specific packages will copy or move this to the appropriate system directory.

     
  • Hi, my apologies for the delayed followup [way too much going on at work, including lots of pretty gnuplot ps/eps plots!]...

    I'd like to thank Ethan Merritt for the quick & helpful followup to my bug report. Setting XAPPLRESDIR to
    /usr/local/share/gnuplot/4.4/ completely solved the problem. [Interestingly, setting it to
    /usr/local/share/gnuplot/4.4/app-defaults did *not* work, from which I conclude that I don't understand
    X app-defaults search paths very well.] Oh well, problem solved, just in time for some nice x11 plots.....

    thanks again, ciao, -- Jonathan Thornburg

     
  • Ethan Merritt
    Ethan Merritt
    2010-06-29

    • status: open --> closed-works-for-me