-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed as not planned
Labels
status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Actiontopic: transforms and scales
Description
I'm seeing fill_between()
drawing polygons incorrectly on a logarithmic X axis.
import numpy as np
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
import sys
plt.xscale('log')
xs = np.array([10, 100])
ys = np.array([10, -25])
zeros = np.array([0, 0])
plt.plot(xs, ys)
plt.fill_between(xs, zeros, ys, where=ys > zeros, facecolor='green', interpolate=True)
plt.fill_between(xs, zeros, ys, where=ys < zeros, facecolor='red', interpolate=True)
plt.savefig(sys.argv[1])
If I comment out the plt.xscale('log')
line everything comes out as expected:
But with the log axis the fill_between()
polygons don't align with the plt.plot(xs, ys)
line:
(This is with matplotlib 1.5.3, installed via pip.)
Metadata
Metadata
Assignees
Labels
status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Actiontopic: transforms and scales