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

Fix occasional long ticks #1513

Merged
merged 1 commit into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/basic_recipes/axis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ function default_ticks(
)
# scale the limits
scaled_ticks, mini, maxi = optimize_ticks(
scale_func(lmin),
scale_func(lmax);
Float64(scale_func(lmin)),
Float64(scale_func(lmax));
k_min = 4, # minimum number of ticks
k_max = 8, # maximum number of ticks
)
Expand All @@ -128,8 +128,8 @@ function default_ticks(
lmin::Number, lmax::Number, ticks::Integer, scale_func = identity
)
scaled_ticks, mini, maxi = optimize_ticks(
scale_func(lmin),
scale_func(lmax);
Float64(scale_func(lmin)),
Float64(scale_func(lmax));
k_min = ticks, # minimum number of ticks
k_max = ticks, # maximum number of ticks
k_ideal = ticks,
Expand Down
2 changes: 1 addition & 1 deletion src/makielayout/ticklocators/wilkinson.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ get_tickvalues(ticks::WilkinsonTicks, vmin, vmax) = get_tickvalues(ticks, Float6

function get_tickvalues(ticks::WilkinsonTicks, vmin::Float64, vmax::Float64)

tickvalues, _ = PlotUtils.optimize_ticks(vmin, vmax;
tickvalues, _ = PlotUtils.optimize_ticks(Float64(vmin), Float64(vmax);
extend_ticks = false, strict_span=true, span_buffer = nothing,
k_min = ticks.k_min,
k_max = ticks.k_max,
Expand Down