Skip to content

Commit

Permalink
convert to Float64 to fix long tick labels (#1513)
Browse files Browse the repository at this point in the history
  • Loading branch information
ffreyer committed Dec 14, 2021
1 parent c92076d commit 929fd19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

0 comments on commit 929fd19

Please sign in to comment.