@@ -137,18 +137,6 @@ def __radd__(self, other: ggplot) -> ggplot:
137137 other .facet .environment = other .environment
138138 return other
139139
140- def axis_positions (self , scales : Scales ) -> tuple [str , str ]:
141- """
142- The sides the x and y axes occupy, as `(x_side, y_side)`
143- """
144- # `scales.add_missing` adds the default x/y scales *after* the layout
145- # is computed (see ggplot._build), so scales.x / scales.y can still be
146- # None here. A missing scale takes the default side of the position
147- # scale that will replace it: "bottom" for x, "left" for y.
148- x_side = "bottom" if scales .x is None else scales .x .position
149- y_side = "left" if scales .y is None else scales .y .position
150- return x_side , y_side
151-
152140 def setup (self , plot : ggplot ):
153141 self .plot = plot
154142 self .layout = plot .layout
@@ -238,7 +226,7 @@ def map(self, data: pd.DataFrame, layout: pd.DataFrame) -> pd.DataFrame:
238226 def compute_layout (
239227 self ,
240228 data : list [pd .DataFrame ],
241- axis_positions : tuple [ str , str ] ,
229+ scales : Scales ,
242230 ) -> pd .DataFrame :
243231 """
244232 Compute layout
@@ -247,8 +235,8 @@ def compute_layout(
247235 ----------
248236 data :
249237 Dataframe for a each layer
250- axis_positions :
251- The sides the x and y axes occupy, as `(x_side, y_side)`
238+ scales :
239+ The plot's scales
252240 """
253241 msg = "{} should implement this method."
254242 raise NotImplementedError (msg .format (self .__class__ .__name__ ))
0 commit comments