Skip to content

Commit 537ecc3

Browse files
committed
Drop dead figure_size/dpi handling from plot_spacer.__add__
plot_annotation now controls the composition's figure size and dpi via Compose.theme; the per-spacer values forwarded into __add__ are no longer read by anything.
1 parent db6f788 commit 537ecc3

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

plotnine/composition/_plot_spacer.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,5 @@ def __add__(self, rhs) -> plot_spacer: # pyright: ignore[reportIncompatibleMeth
4949
self = deepcopy(self)
5050
if isinstance(rhs, theme):
5151
fill = rhs.getp(("plot_background", "facecolor"))
52-
self.theme += theme(
53-
plot_background=element_rect(fill=fill),
54-
# When a spacer is the "last plot" in a composition,
55-
# it is used to determine the figure size and dpi
56-
# and therefore those aspects should be modifiable.
57-
figure_size=rhs.getp("figure_size"),
58-
dpi=rhs.getp("dpi"),
59-
)
52+
self.theme += theme(plot_background=element_rect(fill=fill))
6053
return self

0 commit comments

Comments
 (0)