|
From: Maximilian S. <ste...@gm...> - 2008-10-23 13:46:44
|
Hi everybody, I have to create a line chart with a reverse logarithmic x-axis starting at 1 becoming smaller (to 1e-4). I read the coordinate data from a database, print the configuration and data to a file and then plot it with gnuplot. The line starts at point 0:1 (coordinate origin) and is printed correctly until the last point. But from there it returns horizontally to the y-axis to the point 0:<last printed y-coordinate>. The chart: ------------------------------------------------------ http://www.nabble.com/file/p20131291/not_correct.emf not_correct.emf ------------------------------------------------------ Here's the file I use to plot the chart: ------------------------------------------------------ set terminal emf color dashed font "arial,12" size 800,600 set output "not_correct.emf" set grid lt 28 set logscale x set xrange [1e-4:1] reverse set yrange [0:1] set key box reverse Left top right spacing 1.5 plot '-' title "Data" with lines lt 1 lw 3 0E-20 1.00000000000000000000 0E-20 1.00000000000000000000 0E-20 0.52000000000000000000 0E-20 0.52000000000000000000 0E-20 0.52000000000000000000 0E-20 0.52000000000000000000 0E-20 0.50000000000000000000 0E-20 0.50000000000000000000 0E-20 0.50000000000000000000 0E-20 0.50000000000000000000 0E-20 0.50000000000000000000 0E-20 0.46000000000000000000 0E-20 0.44000000000000000000 0E-20 0.44000000000000000000 0E-20 0.44000000000000000000 0E-20 0.44000000000000000000 0E-20 0.42000000000000000000 0E-20 0.42000000000000000000 0E-20 0.42000000000000000000 0E-20 0.42000000000000000000 0E-20 0.42000000000000000000 0E-20 0.40000000000000000000 0E-20 0.40000000000000000000 0E-20 0.40000000000000000000 0E-20 0.40000000000000000000 0E-20 0.40000000000000000000 0E-20 0.40000000000000000000 0E-20 0.40000000000000000000 0E-20 0.40000000000000000000 0E-20 0.36000000000000000000 0E-20 0.36000000000000000000 0E-20 0.36000000000000000000 0E-20 0.34000000000000000000 0E-20 0.34000000000000000000 0E-20 0.34000000000000000000 0E-20 0.34000000000000000000 0E-20 0.34000000000000000000 0E-20 0.34000000000000000000 0.00500000000000000000 0.32000000000000000000 0.00500000000000000000 0.30000000000000000000 0.00500000000000000000 0.30000000000000000000 0.01000000000000000000 0.26000000000000000000 0.01000000000000000000 0.26000000000000000000 0.03000000000000000000 0.24000000000000000000 0.03000000000000000000 0.24000000000000000000 0.03000000000000000000 0.24000000000000000000 0.04000000000000000000 0.24000000000000000000 0.10000000000000000000 0.20000000000000000000 0.18000000000000000000 0.16000000000000000000 0.26000000000000000000 0.14000000000000000000 0.45500000000000000000 0.12000000000000000000 0.45500000000000000000 0.12000000000000000000 0.64000000000000000000 0.04000000000000000000 0.80500000000000000000 0.04000000000000000000 0.80500000000000000000 0.04000000000000000000 1.00000000000000000000 0E-20 e ------------------------------------------------------ I'm quite new to gnuplot and I have no idea how to fix this. Any help is very appreciated Maximilian Stein -- View this message in context: http://www.nabble.com/Error-in-curve-when-plotting-on-reverse-logarithmic-x-axis-tp20131291p20131291.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Hans-Bernhard B. <HBB...@t-...> - 2008-10-23 22:13:24
|
Maximilian Stein wrote: > The line starts at point 0:1 (coordinate origin) No. It actually _ends_ there, and that's (1,0), not (0,1): x is 1, y is 0. > and is printed correctly > until the last point. But from there it returns horizontally to the y-axis > to the point 0:<last printed y-coordinate>. Where else did you expect it to go? The x coordinate for the first 20 data points or so is not only outside your given range, but completely invalid on a logarithmic axis. Zero has no place on such an axis. |
|
From: Maximilian S. <ste...@gm...> - 2008-10-23 22:46:49
|
Thank you for your quick replys. It was quite easy. Of course the line starts at (0,1), sorry for that. Because of the logarithmic scale this point can't be printed like all other points with x=0. So this is the reason why gnuplot act strange (in my opinion), it starts at the point (1,0.32) which does't exist, but (0.005,0.32) is the next existing point so 0.32 makes sense in some way. I agree that it would be nicer if gnuplot would ignore zero values on logscales or print an error. When I delete all x=0 values it works fine. The zero values have no relevance for this chart either. Thanks again for your quick replys. P.S.: 0e-20 means 0 times 10 to the power of -20 (0*10^-20) so it's 0 (in the db and in my python script it is zero, i don't know why it's exported like that). P.P.S.: 0 to the power of anything is 0. Except 0^0, that's 1 (per definition) -- View this message in context: http://www.nabble.com/Error-in-curve-when-plotting-on-reverse-logarithmic-x-axis-tp20131291p20141059.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |