Skip to content

Commit 7d8d1de

Browse files
Fix margin (#44)
* forcing draw to ensure UltraPlot is correctly visualized * added comment and merging --------- Co-authored-by: Matthew R. Becker <beckermr@users.noreply.github.com>
1 parent a4eafac commit 7d8d1de

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ultraplot/figure.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,6 +1870,8 @@ def savefig(self, filename, **kwargs):
18701870
# do not want to overwrite the matplotlib docstring.
18711871
if isinstance(filename, str):
18721872
filename = os.path.expanduser(filename)
1873+
# NOTE: this draw ensures that we are applying ultraplots layout adjustment. It is unclear what changed with ultraplot's history that makes this necessary, but it seems to cause no issues. Future devs, if unnecessary remove this line and test.
1874+
self.canvas.draw()
18731875
super().savefig(filename, **kwargs)
18741876

18751877
@docstring._concatenate_inherited

0 commit comments

Comments
 (0)