The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Use linewidth=0 to remove the visible outline around a fill_between area. To show an outline, set edgecolor and adjust its thickness with linewidth.
Remove the outline from a filled area
fill_between creates a polygon collection between two curves. Set its line width to zero to suppress the collection’s outline:
ax.fill_between(x, y1, y2, color="C0", alpha=0.3, linewidth=0)
This is the approach used in Matplotlib’s official fill-between example. The fill color and transparency remain controlled by color and alpha.
Draw an edge around the fill
Set edgecolor to choose an outline color, then set linewidth to control its thickness. The shorter aliases are ec and lw.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
ax.fill_between(
x, y1, y2,
facecolor="tab:blue",
edgecolor="navy",
linewidth=1,
)
To make the edge the same color as the filled area, use edgecolor="face":
ax.fill_between(x, y1, y2, facecolor="tab:blue", edgecolor="face")
These styling properties are passed to the FillBetweenPolyCollection returned by the call. The Axes.fill_between API reference documents the supported collection properties, including edgecolor, facecolor and linewidth.
Keep the fill edge separate from plotted curves
The fill’s polygon outline and a curve drawn with plot are separate plot elements. Setting linewidth=0 on fill_between removes the collection outline, but does not hide a line drawn separately:
ax.fill_between(x, y1, y2, color="tab:blue", alpha=0.25, linewidth=0)
ax.plot(x, y1, color="black", linewidth=1)
If a boundary looks doubled, check whether both the fill collection and a separately plotted curve are drawing along it. Adjust the fill edge and the line artist independently.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
Control where and how the area is filled
The call fills between the curves through (x, y1) and (x, y2); if y2 is omitted, it defaults to zero. Use these additional arguments when the filled region needs to follow a condition or stepwise data:
wheretakes a Boolean mask. An interval fromx[i]tox[i+1]is filled only when both corresponding mask values are true. A single true value between false values does not create a filled interval.- For a condition such as
y1 > y2, the curves can cross between sampled points. With the defaultinterpolate=False, the fill is limited to sample positions. Setinterpolate=Trueto estimate the crossing and extend the fill to that intersection. - Set
stepto'pre','post'or'mid'when the fill should represent stepwise values.
See the API reference for argument details. It identifies Matplotlib 3.11.2; consult the documentation matching the version used by your project if its behavior or accepted properties differ.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




