Closed as not planned
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.)