+
diff --git a/lib/matplotlib/tests/baseline_images/test_patches/multi_color_hatch.pdf b/lib/matplotlib/tests/baseline_images/test_patches/multi_color_hatch.pdf
new file mode 100644
index 000000000000..e956cbdf248d
Binary files /dev/null and b/lib/matplotlib/tests/baseline_images/test_patches/multi_color_hatch.pdf differ
diff --git a/lib/matplotlib/tests/baseline_images/test_patches/multi_color_hatch.png b/lib/matplotlib/tests/baseline_images/test_patches/multi_color_hatch.png
new file mode 100644
index 000000000000..21ffd7387710
Binary files /dev/null and b/lib/matplotlib/tests/baseline_images/test_patches/multi_color_hatch.png differ
diff --git a/lib/matplotlib/tests/baseline_images/test_patches/multi_color_hatch.svg b/lib/matplotlib/tests/baseline_images/test_patches/multi_color_hatch.svg
new file mode 100644
index 000000000000..0fde8943eddf
--- /dev/null
+++ b/lib/matplotlib/tests/baseline_images/test_patches/multi_color_hatch.svg
@@ -0,0 +1,469 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
index 5685aca786d7..56c6933248a0 100644
--- a/lib/matplotlib/tests/test_axes.py
+++ b/lib/matplotlib/tests/test_axes.py
@@ -2427,6 +2427,21 @@ def test_errorbar():
ax.set_title("Simplest errorbars, 0.2 in x, 0.4 in y")
+def test_errorbar_colorcycle():
+
+ f, ax = plt.subplots()
+ x = np.arange(10)
+ y = 2*x
+
+ e1, _, _ = ax.errorbar(x, y, c=None)
+ e2, _, _ = ax.errorbar(x, 2*y, c=None)
+ ln1, = ax.plot(x, 4*y)
+
+ assert mcolors.to_rgba(e1.get_color()) == mcolors.to_rgba('C0')
+ assert mcolors.to_rgba(e2.get_color()) == mcolors.to_rgba('C1')
+ assert mcolors.to_rgba(ln1.get_color()) == mcolors.to_rgba('C2')
+
+
def test_errorbar_shape():
fig = plt.figure()
ax = fig.gca()
diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py
index 824751fd09fd..bb963b1e0247 100644
--- a/lib/matplotlib/tests/test_image.py
+++ b/lib/matplotlib/tests/test_image.py
@@ -731,3 +731,13 @@ def test_imshow_no_warn_invalid():
warnings.simplefilter("always")
plt.imshow([[1, 2], [3, np.nan]])
assert len(warns) == 0
+
+
+def test_empty_imshow():
+ fig, ax = plt.subplots()
+ im = ax.imshow([[]])
+ im.set_extent([-5, 5, -5, 5])
+ fig.canvas.draw()
+
+ with pytest.raises(RuntimeError):
+ im.make_image(fig._cachedRenderer)
diff --git a/lib/matplotlib/tests/test_marker.py b/lib/matplotlib/tests/test_marker.py
index e2290f029dcc..c268e4252e9a 100644
--- a/lib/matplotlib/tests/test_marker.py
+++ b/lib/matplotlib/tests/test_marker.py
@@ -14,7 +14,7 @@ def test_markers_valid():
def test_markers_invalid():
marker_style = markers.MarkerStyle()
- mrk_array = np.array([[-0.5, 0, 1, 2, 3]])
+ mrk_array = np.array([[-0.5, 0, 1, 2, 3]])
# Checking this does fail.
with pytest.raises(ValueError):
marker_style.set_marker(mrk_array)
diff --git a/lib/matplotlib/tests/test_patches.py b/lib/matplotlib/tests/test_patches.py
index 03cdd5244ee2..36f3221e9afd 100644
--- a/lib/matplotlib/tests/test_patches.py
+++ b/lib/matplotlib/tests/test_patches.py
@@ -18,6 +18,7 @@
import matplotlib.collections as mcollections
from matplotlib import path as mpath
from matplotlib import transforms as mtrans
+import matplotlib.style as mstyle
import sys
on_win = (sys.platform == 'win32')
@@ -311,3 +312,20 @@ def test_patch_str():
p = mpatches.Arc(xy=(1, 2), width=3, height=4, angle=5, theta1=6, theta2=7)
expected = 'Arc(xy=(1, 2), width=3, height=4, angle=5, theta1=6, theta2=7)'
assert str(p) == expected
+
+
+@image_comparison(baseline_images=['multi_color_hatch'],
+ remove_text=True, style='default')
+def test_multi_color_hatch():
+ fig, ax = plt.subplots()
+
+ rects = ax.bar(range(5), range(1, 6))
+ for i, rect in enumerate(rects):
+ rect.set_facecolor('none')
+ rect.set_edgecolor('C{}'.format(i))
+ rect.set_hatch('/')
+
+ for i in range(5):
+ with mstyle.context({'hatch.color': 'C{}'.format(i)}):
+ r = Rectangle((i-.8/2, 5), .8, 1, hatch='//', fc='none')
+ ax.add_patch(r)
diff --git a/lib/matplotlib/tests/test_scale.py b/lib/matplotlib/tests/test_scale.py
index 53cbc69e4c9d..45ec7557ee88 100644
--- a/lib/matplotlib/tests/test_scale.py
+++ b/lib/matplotlib/tests/test_scale.py
@@ -45,3 +45,10 @@ def test_log_scatter():
buf = io.BytesIO()
fig.savefig(buf, format='svg')
+
+
+def test_logscale_subs():
+ fig, ax = plt.subplots()
+ ax.set_yscale('log', subsy=np.array([2, 3, 4]))
+ # force draw
+ fig.canvas.draw()
diff --git a/matplotlibrc.template b/matplotlibrc.template
index aaaf32e412c0..1e24d7e35e08 100644
--- a/matplotlibrc.template
+++ b/matplotlibrc.template
@@ -399,10 +399,10 @@ backend : $TEMPLATE_BACKEND
#ytick.labelsize : medium # fontsize of the tick labels
#ytick.direction : out # direction: in, out, or inout
#ytick.minor.visible : False # visibility of minor ticks on y-axis
-#xtick.major.left : True # draw y axis left major ticks
-#xtick.major.right : True # draw y axis right major ticks
-#xtick.minor.left : True # draw y axis left minor ticks
-#xtick.minor.right : True # draw y axis right minor ticks
+#ytick.major.left : True # draw y axis left major ticks
+#ytick.major.right : True # draw y axis right major ticks
+#ytick.minor.left : True # draw y axis left minor ticks
+#ytick.minor.right : True # draw y axis right minor ticks
### GRIDS
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy