Closed
Description
When overlaying plot upon a fill_between, the line hangs over the ends. This is most notable with the solid linestyle, but affects all of them. Minor detail but seriously decreases the quality factor of a plot.
import matplotlib as mpl
from matplotlib import pyplot as plt
import numpy as np
mpl.rc('lines', linewidth=10) #optional to improve visibility
plt.cla()
x=np.linspace(0,1,1000)
y=x
plt.plot(x,y,zorder=2, color='k')
plt.fill_between(x,y+.05,y-.05, color='r', zorder=1)
y=x+0.5
plt.plot(x, y, color='k', zorder=2, linestyle="--")
plt.fill_between(x,y+.05,y-.05, color='r', zorder=1)
y=x+1
plt.plot(x, y, color='k', zorder=2, linestyle=":")
plt.fill_between(x, y+.05, y-.05, color='r', zorder=1)
y=x+1.5
plt.plot(x, y, color='k', zorder=2, linestyle="-.")
plt.fill_between(x, y+.05, y-.05, color='r', zorder=1)
plt.show()
# Paste your code here
#
#
Matplotlib version
- Operating System: cygwin64 fresh install
- Matplotlib Version: 2.0.2
- Python Version: 3.6.1
- Jupyter Version (if applicable): 5.0.0
- Other Libraries:
installed from pip
Metadata
Metadata
Assignees
Labels
No labels