8000
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 ee1a599 commit ddcf618Copy full SHA for ddcf618
lib/matplotlib/tests/test_figure.py
@@ -158,6 +158,24 @@ def _as_mpl_axes(self):
158
plt.close(fig)
159
160
161
+@cleanup
162
+def test_set_fig_size():
163
+ fig = plt.figure()
164
+
165
+ # check figwidth
166
+ fig.set_figwidth(5)
167
+ assert_equal(fig.get_figwidth(), 5)
168
169
+ # check figheight
170
+ fig.set_figheight(1)
171
+ assert_equal(fig.get_figheight(), 1)
172
173
+ # check using set_size_inches
174
+ fig.set_size_inches(2, 4)
175
+ assert_equal(fig.get_figwidth(), 2)
176
+ assert_equal(fig.get_figheight(), 4)
177
178
179
if __name__ == "__main__":
180
import nose
181
nose.runmodule(argv=['-s', '--with-doctest'], exit=False)
0 commit comments