x2tics in logscale should use the same xrange as x1tics

Jérôme Borme <[email protected]> Thu, 18 Nov 2010 21:24:03 +0100
Newsgroups gmane.comp.graphics.gnuplot.bugs
Message-ID <[email protected]>
Dear all,

  I am trying to use x2tics in logscale while plotting data from a file, and I 
think there is a problem if the user does not specify the xrange. 

I used gnuplot 4.4.2. (I was not able to put the current CVS current to draw 
anything in logscale.)

Let's assume there is a file "test.dat" containing these three lines:
    5    0.1
    100  0.3
    8000 0.03

Then we enter the following commands at gnuplot prompt:
set logscale
set xtics nomirror
set x2tics 10,2,10000                     # or whatever values.
plot [1:10000] "test.dat" using 1:2
# that works ok.

plot "test.dat" using 1:2
# That does not work good.

The problem is that if no range is specified, then the two scales (top and 
bottom) do not match. Actually the bottom scale (x1) is slightly enlarged and 
goes from 1 to 10,000 to look nicer. On the other hand, the top scale (x2) is 
tightly bound to the extrema of the data, and starts from 5 to 8000. As a 
result, the x2tics do not match the data points. The workaround is to specify 
manually the range to be used.

The current CVS version refused altogether to draw in logscale so I could not 
test if the problem has been fixed in the development version.

Version 4.5 patchlevel 0 (Gentoo revision r0)
last modified jeu. nov. 18 19:50:05 CET 2010
System: Linux 2.6.36

gnuplot> plot "test.dat" using 1:2
# that was ok. Let's try the logscale.
gnuplot> set logscale
gnuplot> plot "test.dat" using 1:2
        x_min should not equal x_max!

Best regards,

Jérôme Borme

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
gnuplot-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnuplot-bugs