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 b73adcf commit 438923fCopy full SHA for 438923f
lib/matplotlib/tests/test_multivariate_colormaps.py
@@ -478,6 +478,19 @@ def test_bivariate_repr_html():
478
assert html.endswith('</div>')
479
480
481
+def test_multivariate_repr_png():
482
+ cmap = mpl.multivar_colormaps['3VarAddA']
483
+ png = cmap._repr_png_()
484
+ assert len(png) > 0
485
+ img = Image.open(BytesIO(png))
486
+ assert img.width > 0
487
+ assert img.height > 0
488
+ assert 'Title' in img.text
489
+ assert 'Description' in img.text
490
+ assert 'Author' in img.text
491
+ assert 'Software' in img.text
492
+
493
494
def test_multivariate_repr_html():
495
cmap = mpl.multivar_colormaps['3VarAddA']
496
html = cmap._repr_html_()
0 commit comments