From 8d1727e66d8a993f63228050fd48f2c841dc09b7 Mon Sep 17 00:00:00 2001 From: lch Date: Tue, 10 Oct 2023 17:28:54 +0800 Subject: [PATCH 1/2] Fix border tick of framestyle :box --- src/axes.jl | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/src/axes.jl b/src/axes.jl index 57b4e66d9..0f7609c14 100644 --- a/src/axes.jl +++ b/src/axes.jl @@ -886,6 +886,21 @@ function axis_drawing_info(sp, letter) grid_factor_2d[] / ax_length, ax[:tick_direction] !== :none, ) + if sp[:framestyle] === :box + add_major_or_minor_segments_2d( + sp, + ax, + oax, + reverse(oas), + oamM, + first(ticks), + ax[:grid], + tick_segments, + grid_segments, + grid_factor_2d[] / ax_length, + ax[:tick_direction] !== :none, + ) + end # add minor grid segments if ax[:minorticks] ∉ (:none, nothing, false) || ax[:minorgrid] @@ -902,10 +917,25 @@ function axis_drawing_info(sp, letter) grid_factor_2d[] / 2ax_length, true, ) + if sp[:framestyle] === :box + add_major_or_minor_segments_2d( + sp, + ax, + oax, + reverse(oas), + oamM, + minor_ticks, + ax[:minorgrid], + tick_segments, + minorgrid_segments, + grid_factor_2d[] / 2ax_length, + true, + ) + end end end end - + ( ticks = ticks, segments = segments, From 13d4b7127a39185fd0eda5bbaf7c7713c2296fb2 Mon Sep 17 00:00:00 2001 From: lch Date: Fri, 13 Oct 2023 17:09:05 +0800 Subject: [PATCH 2/2] Format with JuliaFormatter --- src/axes.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/axes.jl b/src/axes.jl index 0f7609c14..f9b733cd3 100644 --- a/src/axes.jl +++ b/src/axes.jl @@ -935,7 +935,7 @@ function axis_drawing_info(sp, letter) end end end - + ( ticks = ticks, segments = segments,