Skip to content
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

Bug using IntervalsBetween for minor ticks on a log scale #3690

Open
3 tasks done
IlianPihlajamaa opened this issue Mar 8, 2024 · 3 comments
Open
3 tasks done

Bug using IntervalsBetween for minor ticks on a log scale #3690

IlianPihlajamaa opened this issue Mar 8, 2024 · 3 comments
Assignees
Labels

Comments

@IlianPihlajamaa
Copy link

  • are you running newest version (version from docs) ?
  • can you reproduce the bug with a fresh environment ? (]activate --temp; add Makie)
  • What platform + GPU are you on?

If, on a log scale, there are fewer than 2 major ticks visible, the minor ticks are not plotted. See the right panel of the example below. This is only relevant to IntervalsBetween(n), specifying the ticks manually does work.

using CairoMakie

fig = Figure()
ax = Axis(fig[1, 1],
    yscale=log10,
    yticks=LogTicks(-13:13),
    yminorticks=IntervalsBetween(9),
    yminorticksvisible=true,
    limits=(0, 10, 0.8, 12)
)


ax = Axis(fig[1, 2],
    yscale=log10,
    yticks=LogTicks(-13:13),
    yminorticks=IntervalsBetween(9),
    yminorticksvisible=true,
    limits=(0, 10, 2, 12)
)

fig

image

Julia Version 1.10.1
Commit 7790d6f064 (2024-02-13 20:41 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 12 × Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 6 default, 0 interactive, 3
GC (on 12 virtual cores)
Environment:
JULIA_EDITOR = code
JULIA_NUM_THREADS = 6

@jkrumbiegel
Copy link
Member

If, on a log scale, there are fewer than 2 major ticks visible

hm yeah that currently is this way everywhere. I guess the computation of the minor ticks should be done on all the ticks, not just the visible ones

@IlianPihlajamaa
Copy link
Author

Interestingly, if you look at the bottom of the left panel, the minor ticks are done correctly (even outside the visible major ticks) when there are at least 2 major ticks within bounds.

@jkrumbiegel
Copy link
Member

Yes because it uses the neighboring interval

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants