gnudatalanguage / gdl

GDL - GNU Data Language
GNU General Public License v2.0
276 stars 61 forks source link

logarithmic plot does not format tick values with decimal point #1887

Open alaingdl opened 1 week ago

alaingdl commented 1 week ago

(tested with the current Git version)

a=ABS(randomn(101, 1000))
plot_io, a, yr=[0.1, 10],/yst     ; (same as plot,/ylog, a, yr=[0.1, 10],/yst)

In IDL, the legend for yrange go from 0.1 to 10.0, What is displayed : 0.1, 1.0, 10.0

In GDL, it seems that digits are missing : 0, 1, 10 are displayed

idl_Capture d’écran du 2024-10-15 13-04-38 GDL_Capture d’écran du 2024-10-15 13-05-00

GillesDuvert commented 1 week ago

a bug indeed!

GillesDuvert commented 1 week ago

a=ABS(randomn(101, 1000)) & plot_io, a, yr=[0.1, 10] plots correctly. This is weird.

alaingdl commented 1 week ago

In fact, I did not realize that without /ystyle it was OK, because we are trying to make a large set of figures with a given fixed range. :smile:

GillesDuvert commented 1 week ago

this is a classic: IDL uses floats, we use doubles. This should do the trick. Needs to be well tested, though, as it may have consequences elsewhere...