MakieOrg / Makie.jl

Interactive data visualizations and plotting in Julia
https://docs.makie.org/stable
MIT License
2.41k stars 312 forks source link

`pseudolog10` doesn't give nice ticks #1319

Open ericphanson opened 3 years ago

ericphanson commented 3 years ago
julia> using CairoMakie

julia> save("log10.png", scatter(exp.(1:10), 1:10; axis=(; xscale=log10)))
CairoScreen{Cairo.CairoSurfaceBase{UInt32}} with surface:
Cairo.CairoSurfaceBase{UInt32}(Ptr{Nothing} @0x00007f9d6bc142f0, 800.0, 600.0)

log10

while

julia> save("pseudolog10.png", scatter(exp.(1:10), 1:10; axis=(; xscale=Makie.pseudolog10)))
CairoScreen{Cairo.CairoSurfaceBase{UInt32}} with surface:
Cairo.CairoSurfaceBase{UInt32}(Ptr{Nothing} @0x00007f9d6bc51d70, 800.0, 600.0)

gives pseudolog10

jkrumbiegel commented 3 years ago

True, I didn't have ideas yet for a good algorithm. If zero is in the plot, you'd get infinite ticks with the log algorithm. So there must be some heuristic when to show what.

ericphanson commented 3 years ago

No worries, just wanted to track the issue somewhere. Having the pseudolog10 is already super useful :).