@@ -509,12 +513,12 @@ z
-
+
-
+
@@ -530,12 +534,12 @@ z
-
+
-
+
@@ -553,104 +557,104 @@ z
+" id="mb12535d6a8" style="stroke:#000000;stroke-width:0.5;"/>
-
+
+" id="m8a2e629618" style="stroke:#000000;stroke-width:0.5;"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -658,7 +662,7 @@ L -2 0
-
+
diff --git a/lib/matplotlib/tests/baseline_images/test_scale/logscale_mask.png b/lib/matplotlib/tests/baseline_images/test_scale/logscale_mask.png
new file mode 100644
index 000000000000..0f142c315729
Binary files /dev/null and b/lib/matplotlib/tests/baseline_images/test_scale/logscale_mask.png differ
diff --git a/lib/matplotlib/tests/test_scale.py b/lib/matplotlib/tests/test_scale.py
index 45ec7557ee88..e23ba8fcdd51 100644
--- a/lib/matplotlib/tests/test_scale.py
+++ b/lib/matplotlib/tests/test_scale.py
@@ -52,3 +52,16 @@ def test_logscale_subs():
ax.set_yscale('log', subsy=np.array([2, 3, 4]))
# force draw
fig.canvas.draw()
+
+
+@image_comparison(baseline_images=['logscale_mask'], remove_text=True,
+ extensions=['png'])
+def test_logscale_mask():
+ # Check that zero values are masked correctly on log scales.
+ # See github issue 8045
+ xs = np.linspace(0, 50, 1001)
+
+ fig, ax = plt.subplots()
+ ax.plot(np.exp(-xs**2))
+ fig.canvas.draw()
+ ax.set(yscale="log")
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