8000 Check that the formatter is the correct one · matplotlib/matplotlib@b66d739 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b66d739

Browse files
committed
Check that the formatter is the correct one
1 parent f8c86c8 commit b66d739

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/tests/test_colorbar.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
BoundaryNorm, LogNorm, PowerNorm, Normalize, NoNorm
1616
)
1717
from matplotlib.colorbar import Colorbar
18< 7727 /td>-
from matplotlib.ticker import FixedLocator, LogFormatter
18+
from matplotlib.ticker import FixedLocator, LogFormatter, StrMethodFormatter
1919
from matplotlib.testing.decorators import check_figures_equal
2020

2121

@@ -1234,4 +1234,5 @@ def test_colorbar_wrong_figure():
12341234

12351235
def test_colorbar_format_string_and_old():
12361236
plt.imshow([[0, 1]])
1237-
plt.colorbar(format="{x}%")
1237+
cb = plt.colorbar(format="{x}%")
1238+
assert isinstance(cb._formatter, StrMethodFormatter)

0 commit comments

Comments
 (0)
0