Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alaingdl opened this issue Oct 15, 2024 · 4 comments
Closed

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

alaingdl opened this issue Oct 15, 2024 · 4 comments

Comments

@alaingdl
Copy link
Contributor

(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 GillesDuvert changed the title bad values for Y-range whit logarithmic plot logarithmic plot does not format tick values with decimal point Oct 15, 2024
@GillesDuvert
Copy link
Contributor

a bug indeed!

@GillesDuvert
Copy link
Contributor

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

@alaingdl
Copy link
Contributor Author

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. 😄

@GillesDuvert
Copy link
Contributor

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...

GillesDuvert added a commit that referenced this issue Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants