File tree 2 files changed +16
-2
lines changed 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ title: Changelog
15
15
- [ ] ( :class:`~plotnine.geom_text` ) has gained new aesthetics
16
16
` fontvariant ` and ` fontstretch ` .
17
17
18
+ ### Bug Fixes
19
+
20
+ - Fix layers 3 and above not to overlap the axis lines if there are any
21
+ ({{< issue 798 >}}).
18
22
19
23
## v0.13.6
20
24
(2024-05-09)
Original file line number Diff line number Diff line change @@ -893,8 +893,13 @@ class axis_line_x(themeable):
893
893
894
894
def apply_ax (self , ax : Axes ):
895
895
super ().apply_ax (ax )
896
+ properties = self .properties
897
+ # MPL has a default zorder of 2.5 for spines
898
+ # so layers 3+ would be drawn on top of the spines
899
+ if "zorder" not in properties :
900
+ properties ["zorder" ] = 10000
896
901
ax .spines ["top" ].set_visible (False )
897
- ax .spines ["bottom" ].set (** self . properties )
902
+ ax .spines ["bottom" ].set (** properties )
898
903
899
904
def blank_ax (self , ax : Axes ):
900
905
super ().blank_ax (ax )
@@ -916,8 +921,13 @@ class axis_line_y(themeable):
916
921
917
922
def apply_ax (self , ax : Axes ):
918
923
super ().apply_ax (ax )
924
+ properties = self .properties
925
+ # MPL has a default zorder of 2.5 for spines
926
+ # so layers 3+ would be drawn on top of the spines
927
+ if "zorder" not in properties :
928
+ properties ["zorder" ] = 10000
919
929
ax .spines ["right" ].set_visible (False )
920
- ax .spines ["left" ].set (** self . properties )
930
+ ax .spines ["left" ].set (** properties )
921
931
922
932
def blank_ax (self , ax : Axes ):
923
933
super ().blank_ax (ax )
You can’t perform that action at this time.
0 commit comments