-
-
Notifications
You must be signed in to change notification settings - Fork 329
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
LogTicks
works poorly with pseudolog10
#4856
Labels
Comments
I guess it's applying the wrong function...might need a specialized tick finder |
I will investigate |
diff --git a/src/makielayout/lineaxis.jl b/src/makielayout/lineaxis.jl
index d6db1b4e6..fd1532b4c 100644
--- a/src/makielayout/lineaxis.jl
+++ b/src/makielayout/lineaxis.jl
@@ -593,6 +593,7 @@ function get_ticks(tickfunction::Function, _, formatter, vmin, vmax)
return tickvalues, ticklabels
end
+_logbase(::typeof(pseudolog10)) = "10"
_logbase(::typeof(log10)) = "10"
_logbase(::typeof(log2)) = "2"
_logbase(::typeof(log)) = "e"
@@ -603,7 +604,7 @@ function get_ticks(::Automatic, scale::LogFunctions, any_formatter, vmin, vmax)
end
# log ticks just use the normal pipeline but with log'd limits, then transform the labels
-function get_ticks(l::LogTicks, scale::LogFunctions, ::Automatic, vmin, vmax)
+function get_ticks(l::LogTicks, scale::Union{LogFunctions, typeof(pseudolog10)}, ::Automatic, vmin, vmax)
ticks_scaled = get_tickvalues(l.linear_ticks, identity, scale(vmin), scale(vmax))
ticks = Makie.inverse_transform(scale).(ticks_scaled) does this seem reasonable? |
I don't know if I should add symlog10 and pseudolog10 into the Union of |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: