-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
Symlog scale leads to weird results #3788
Comments
ok so I think the labels are explained such that the linear tick finder is applied, which sees limits from about -2 to 1. So you get ticks -2, -1, 0, 1 but in the symlog scaling, -1, 0 and 1 for some reason all go on top of each other. That I don't understand |
What happens if you try pseudolog? |
Pseudolog displays fine, but it's not symlog :) Most importantly, it lacks the parameter that decides on where log-scale effectively starts. function symlog(x; linthresh, base=10., linscale=1.)
linscale_adj = linscale / (1 - base^-1)
if abs(x) < linthresh
return x * linscale_adj
else
return sign(x) * linthresh * (linscale_adj + log(base, abs(x) / linthresh))
end
end – it seems to work fine as a scale in Makie. |
I don't remember anymore where I got the formula from, if I didn't come up with it myself from my understanding of what symlog should do. If it turns out to be incorrect, let's change it by all means. |
I believe the |
I’m trying to plot a 2d array with both positive an negative values, using a “symlog” colorscale in Makie.
This is what I get, looks weird – I cannot make any sense out of colorbar labels:
And this is what I expected it to be – result from matplotlib for the same array for comparison:
My issue here is with the colorscale specifically, not any other visual difference between Makie and matplotlib.
Full code for both:
]activate --temp; add Makie
) – yesThe text was updated successfully, but these errors were encountered: