Skip to content

Commit dd5a537

Browse files
committed
Add compose docstring
1 parent b6682c2 commit dd5a537

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

plotnine/plot_composition/_compose.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,20 @@ def draw(self, *, show: bool = False) -> Figure:
283283
)
284284
return figure
285285

286-
def save(
287-
self, filename: str | Path | BytesIO, save_format: str | None = None
288-
):
286+
def save(self, filename: str | Path | BytesIO, format: str | None = None):
287+
"""
288+
Save a Compose object as an image file
289+
290+
Parameters
291+
----------
292+
filename :
293+
File name to write the plot to. If not specified, a name
294+
format :
295+
Image format to use, automatically extract from
296+
file name extension.
297+
"""
289298
figure = self.draw()
290-
figure.savefig(filename, format=save_format)
299+
figure.savefig(filename, format=format)
291300

292301

293302
@dataclass

0 commit comments

Comments
 (0)