Skip to content

Commit

Permalink
Merge branch 'main' into quarto-figure-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
has2k1 authored Jun 14, 2024
2 parents 3fddd24 + c3678ec commit 6d11191
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
6 changes: 5 additions & 1 deletion doc/changelog.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ title: Changelog
- The `family`, `fontstyle` and `fontweight` parameters of
[](:class:`~plotnine.geom_text`) are now aesthetics ({{< issue 790 >}}).


- plotnine now responds to the `fig-width`, `fig-height` and `fig-format`
settings in the meta section of a quarto document.

Expand All @@ -19,6 +18,11 @@ title: Changelog
- [](:class:`~plotnine.geom_text`) has gained new aesthetics
`fontvariant` and `fontstretch`.

### Bug Fixes

- Fix layers 3 and above not to overlap the axis lines if there are any
({{< issue 798 >}}).

## v0.13.6
(2024-05-09)

Expand Down
14 changes: 12 additions & 2 deletions plotnine/themes/themeable.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,8 +893,13 @@ class axis_line_x(themeable):

def apply_ax(self, ax: Axes):
super().apply_ax(ax)
properties = self.properties
# MPL has a default zorder of 2.5 for spines
# so layers 3+ would be drawn on top of the spines
if "zorder" not in properties:
properties["zorder"] = 10000
ax.spines["top"].set_visible(False)
ax.spines["bottom"].set(**self.properties)
ax.spines["bottom"].set(**properties)

def blank_ax(self, ax: Axes):
super().blank_ax(ax)
Expand All @@ -916,8 +921,13 @@ class axis_line_y(themeable):

def apply_ax(self, ax: Axes):
super().apply_ax(ax)
properties = self.properties
# MPL has a default zorder of 2.5 for spines
# so layers 3+ would be drawn on top of the spines
if "zorder" not in properties:
properties["zorder"] = 10000
ax.spines["right"].set_visible(False)
ax.spines["left"].set(**self.properties)
ax.spines["left"].set(**properties)

def blank_ax(self, ax: Axes):
super().blank_ax(ax)
Expand Down

0 comments on commit 6d11191

Please sign in to comment.