Skip to content

Commit

Permalink
Add font size traits to various classes (Fixes #1805)
Browse files Browse the repository at this point in the history
Add titlesize trait to MapPanel. Add clabelsize trait to ContourTraits. Add colorbar_fontsize trait to ColorfillTraits. Add font_size trait to PlotObs.
  • Loading branch information
23ccozad committed Jun 8, 2021
1 parent bf82fc7 commit 8ce5d54
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tests/plots/test_declarative.py
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,9 @@ def test_declarative_title_fontsize():
return pc.figure


@pytest.mark.mpl_image_compare(remove_text=False, tolerance=0.607)
@pytest.mark.mpl_image_compare(remove_text=False,
tolerance={'3.1': 11.49,
'3.0': 11.49}.get(MPL_VERSION, 0.607))
@needs_cartopy
def test_declarative_colorbar_fontsize():
"""Test adjusting the font size of a colorbar."""
Expand Down Expand Up @@ -1210,8 +1212,9 @@ def test_declarative_colorbar_fontsize():
return pc.figure


@pytest.mark.mpl_image_compare(remove_text=True, tolerance=0.607)
@needs_cartopy
@pytest.mark.mpl_image_compare(remove_text=True,
tolerance={'3.1': 2.12,
'3.0': 2.12}.get(MPL_VERSION, 0.607))
def test_declarative_station_plot_fontsize():
"""Test adjusting the font size for station plots in PlotObs."""
data = parse_metar_file(get_test_data('metar_20190701_1200.txt',
Expand Down Expand Up @@ -1245,7 +1248,9 @@ def test_declarative_station_plot_fontsize():
return pc.figure


@pytest.mark.mpl_image_compare(remove_text=True, tolerance=0.607)
@pytest.mark.mpl_image_compare(remove_text=True,
tolerance={'3.1': 20.3,
'3.0': 20.3}.get(MPL_VERSION, 0.607))
@needs_cartopy
def test_declarative_contour_label_fontsize():
"""Test adjusting the font size of contour labels."""
Expand Down

0 comments on commit 8ce5d54

Please sign in to comment.