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] WilkinsonTicks reduces ticks to 2 no matter what #2861

Open
Datseris opened this issue Apr 17, 2023 · 5 comments · May be fixed by #2892
Open

[BUG] WilkinsonTicks reduces ticks to 2 no matter what #2861

Datseris opened this issue Apr 17, 2023 · 5 comments · May be fixed by #2892
Labels
Axis related to `Axis()` objects enhancement Feature requests and enhancements Makie Backend independent issues (Makie core)

Comments

@Datseris
Copy link
Contributor

MWE:

using CairoMakie

x = -17.5:0.5
y = @. 1.14x - 2

fig, ax = lines(x, y)
fig

image

And then do:

ax.xticks = WilkinsonTicks(8)
fig

image

No matter what number is given to WilkinsonTicks, the resulting plot will have only 2 ticks.

@Datseris
Copy link
Contributor Author

Doing fig, ax = lines(x, y; axis = (xticks = WilkinsonTicks(8),)) changes nothing; also makes ticks only 2.

@Datseris
Copy link
Contributor Author

It only works when I explicitly increase the k_min keyword argument to 6.

@asinghvi17
Copy link
Member

We could have k_max and k_min move with k_ideal?

@Datseris
Copy link
Contributor Author

Sounds good, but still not sure why this doesn't work as is; isn't the initial min = 2 anyways? Why is the initial plot with more ticks?

@asinghvi17
Copy link
Member

The initial plot is using LinearTicks, which is probably why your plot is showing this discrepancy...

@asinghvi17 asinghvi17 linked a pull request Apr 23, 2023 that will close this issue
4 tasks
@ffreyer ffreyer added enhancement Feature requests and enhancements Makie Backend independent issues (Makie core) Axis related to `Axis()` objects labels Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Axis related to `Axis()` objects enhancement Feature requests and enhancements Makie Backend independent issues (Makie core)
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

3 participants