Matplotlib in Python
Matplotlib in Python
How to Annotate Matplotlib Scatterplots
You can use the following basic syntax to annotate scatter plots in Matplotlib:
#add 'my text' at (x, y) coordinates = (6, 9.5)
plt.text(6, 9.5, 'my...
Matplotlib in Python
How to Adjust the Position of a Matplotlib Colorbar
A colorbar is a bar that runs along the side of a Matplotlib chart and acts as a legend for the colors shown in...
Matplotlib in Python
How to Create Stacked Bar Charts in Matplotlib (With Examples)
A stacked bar chart is a type of chart that uses bars to display the frequencies of different categories.
We can create this type of chart...
Matplotlib in Python
How to Plot a Smooth Curve in Matplotlib
Often you may want to plot a smooth curve in Matplotlib for a line chart. Fortunately this is easy to do with the help...
Matplotlib in Python
How to Place the Legend Outside of a Matplotlib Plot
Often you may want to place the legend of a Matplotlib plot outside of the actual plot.
Fortunately this is easy to do using the...
Matplotlib in Python
How to Show Gridlines on Matplotlib Plots
By default, Matplotlib does not display gridlines on plots. However, you can use the matplotlib.pyplot.grid() function to easily display and customize gridlines on a...
Matplotlib in Python
How to Create Matplotlib Plots with Log Scales
Often you may want to create Matplotlib plots with log scales for one or more axes. Fortunately Matplotlib offers the following three functions for...
Subscribe
- Never miss a story with notifications
- Gain full access to our premium content
- Browse free from up to 5 devices at once
Must read