@@ 72-83 (lines=12) @@ | ||
69 | return np.linspace(1000, 100, 10), np.linspace(20, -20, 10), np.linspace(25, -30, 10) |
|
70 | ||
71 | ||
72 | @pytest.mark.mpl_image_compare(tolerance={'1.4': 1.71}.get(MPL_VERSION, 0.), remove_text=True) |
|
73 | def test_skewt_shade_cape_cin(test_profile): |
|
74 | """Test shading CAPE and CIN on a SkewT plot.""" |
|
75 | p, t, tp = test_profile |
|
76 | fig = plt.figure(figsize=(9, 9)) |
|
77 | skew = SkewT(fig) |
|
78 | skew.plot(p, t, 'r') |
|
79 | skew.plot(p, tp, 'k') |
|
80 | skew.shade_cape(p, t, tp) |
|
81 | skew.shade_cin(p, t, tp) |
|
82 | skew.ax.set_xlim(-50, 50) |
|
83 | return fig |
|
84 | ||
85 | ||
86 | @pytest.mark.mpl_image_compare(tolerance={'1.4': 1.70}.get(MPL_VERSION, 0.), remove_text=True) |
|
@@ 110-120 (lines=11) @@ | ||
107 | skew.shade_area(p, t, tp, which='positve') |
|
108 | ||
109 | ||
110 | @pytest.mark.mpl_image_compare(tolerance={'1.4': 1.75}.get(MPL_VERSION, 0.), remove_text=True) |
|
111 | def test_skewt_shade_area_kwargs(test_profile): |
|
112 | """Test shading areas on a SkewT plot with kwargs.""" |
|
113 | p, t, tp = test_profile |
|
114 | fig = plt.figure(figsize=(9, 9)) |
|
115 | skew = SkewT(fig) |
|
116 | skew.plot(p, t, 'r') |
|
117 | skew.plot(p, tp, 'k') |
|
118 | skew.shade_area(p, t, tp, facecolor='m') |
|
119 | skew.ax.set_xlim(-50, 50) |
|
120 | return fig |
|
121 | ||
122 | ||
123 | @pytest.mark.mpl_image_compare(tolerance=0, remove_text=True) |
|
@@ 86-96 (lines=11) @@ | ||
83 | return fig |
|
84 | ||
85 | ||
86 | @pytest.mark.mpl_image_compare(tolerance={'1.4': 1.70}.get(MPL_VERSION, 0.), remove_text=True) |
|
87 | def test_skewt_shade_area(test_profile): |
|
88 | """Test shading areas on a SkewT plot.""" |
|
89 | p, t, tp = test_profile |
|
90 | fig = plt.figure(figsize=(9, 9)) |
|
91 | skew = SkewT(fig) |
|
92 | skew.plot(p, t, 'r') |
|
93 | skew.plot(p, tp, 'k') |
|
94 | skew.shade_area(p, t, tp) |
|
95 | skew.ax.set_xlim(-50, 50) |
|
96 | return fig |
|
97 | ||
98 | ||
99 | def test_skewt_shade_area_invalid(test_profile): |