The final answer I came up with is to use fill_between
.
I thought there would have been a simple shade between type method, but this does exactly what I want.
section = np.arange(-1, 1, 1/20.)
plt.fill_between(section,f(section))
More Related Contents:
- how to do multiple scatter plots with matploatlib
- How to find the exact intersection of a curve (as np.array) with y==0?
- surface plots in matplotlib
- FutureWarning: elementwise comparison failed; returning scalar, but in the future will perform elementwise comparison
- Histogram Matplotlib
- Matplotlib log scale tick label number formatting
- Why does pyplot.contour() require Z to be a 2D array?
- How to create a density plot in matplotlib?
- Matplotlib yaxis range display using absolute values rather than offset values?
- Pythonic way of detecting outliers in one dimensional observation data
- Polar contour plot in matplotlib – best (modern) way to do it?
- How to fix ‘numpy.ndarray’ object has no attribute ‘get_figure’ when plotting subplots
- how to annotate heatmap with text in matplotlib
- 2D and 3D Scatter Histograms from arrays in Python
- Generating movie from python without saving individual frames to files
- How to overplot a line on a scatter plot in python?
- Creating a Confidence Ellipsis in a scatterplot using matplotlib
- Using datetime as ticks in Matplotlib
- Plot the x-axis as a date
- setting spacing between grouped bar plots in matplotlib
- Axes from plt.subplots() is a “numpy.ndarray” object and has no attribute “plot”
- How to automatically annotate maximum value in pyplot
- matplotlib show() doesn’t work twice
- new pythonic style for shared axes square subplots in matplotlib?
- line, = plot(x,sin(x)) what does comma stand for?
- How to have logarithmic bins in a Python histogram
- Extract csv file specific columns to list in Python
- Figure to image as a numpy array
- Annotate Time Series plot
- ValueError: x and y must be the same size