Skip to content

Commit

Permalink
✨ add save fig function in Panel.
Browse files Browse the repository at this point in the history
  • Loading branch information
perillaroc committed Jul 2, 2024
1 parent 5dedbd6 commit 015ac15
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cedarkit/maps/chart/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ def fig(self) -> plt.Figure:
def show(self):
plt.show()

def save(self, *args, bbox_inches="tight", **kwargs):
return plt.savefig(*args, bbox_inches=bbox_inches, **kwargs)

def add_chart(self, domain: XYTemplate) -> Chart:
"""
Add a ``Chart`` to the panel
Expand Down

0 comments on commit 015ac15

Please sign in to comment.