Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcec42b commit 339dcb1Copy full SHA for 339dcb1
lib/matplotlib/tests/test_figure.py
@@ -1636,3 +1636,18 @@ def test_get_constrained_layout_pads():
1636
fig = plt.figure(layout=mpl.layout_engine.ConstrainedLayoutEngine(**params))
1637
with pytest.warns(PendingDeprecationWarning, match="will be deprecated"):
1638
assert fig.get_constrained_layout_pads() == expected
1639
+
1640
1641
+def test_not_visible_figure():
1642
+ fig = Figure()
1643
1644
+ buf = io.StringIO()
1645
+ fig.savefig(buf, format='svg')
1646
+ buf.seek(0)
1647
+ assert '<g ' in buf.read()
1648
1649
+ fig.set_visible(False)
1650
1651
1652
1653
+ assert '<g ' not in buf.read()
0 commit comments