Skip to content

Commit

Permalink
fix minorticks
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg committed Nov 19, 2022
1 parent b773999 commit 255f2d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/arg_desc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ const _arg_desc = KW(
:gridlinewidth => (Real, "Width of the grid lines (in pixels)."),
:foreground_color_minor_grid => (ColorType, "Color of minor grid lines (`:match` matches `:foreground_color_subplot`)."),
:minorgrid => (Bool, "Adds minor grid lines and ticks to the plot. Set minorticks to change number of gridlines."),
:minorticks => (Integer, "Intervals to divide the gap between major ticks into."),
:minorticks => (Integer, "Number of minor ticks between major ticks."),
:minorgridalpha => (Real, "The alpha/opacity override for the minorgrid lines."),
:minorgridstyle => (Symbol, "Style of the minor grid lines. Choose from $(_allStyles)."),
:minorgridlinewidth => (Real, "Width of the minor grid lines (in pixels)."),
Expand Down
4 changes: 2 additions & 2 deletions src/axes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ function get_minor_ticks(sp, axis, ticks_and_labels)
end

# default to 9 intervals between major ticks for log10 scale and 5 intervals otherwise
n = if typeof(axis[:minorticks]) <: Integer && axis[:minorticks] > 1
axis[:minorticks]
n = if typeof(axis[:minorticks]) <: Integer && axis[:minorticks] > 0
axis[:minorticks] + 1
else
scale === :log10 ? 9 : 5
end
Expand Down

0 comments on commit 255f2d9

Please sign in to comment.