Matplotlib Plot: Difference between revisions
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
{{Internal|Matplotlib#Difference_between_Plot_and_Scatter|Difference between Plot and Scatter}} | {{Internal|Matplotlib#Difference_between_Plot_and_Scatter|Difference between Plot and Scatter}} | ||
=Input Data= | =Input Data= | ||
<syntaxhighlight lang='py'> | |||
plot([x], y, [fmt], ...) | |||
</syntaxhighlight> | |||
The coordinates of the points or line nodes are given by <code>x</code>, <code>y</code>. | |||
==Multiple Series== | ==Multiple Series== | ||
If multiple pairs of <code>x</code>/<code>y</code> arguments are provided, multiple lines are plotted: | |||
<syntaxhighlight lang='py'> | <syntaxhighlight lang='py'> | ||
plot([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs) | plot([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=Style= | =Style= |
Revision as of 22:01, 7 October 2023
External
- Example https://matplotlib.org/stable/plot_types/basic/plot.html#sphx-glr-plot-types-basic-plot-py
- Documentation https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.plot.html#matplotlib.axes.Axes.plot
Internal
Overview
Difference between Plot and Scatter
Input Data
plot([x], y, [fmt], ...)
The coordinates of the points or line nodes are given by x
, y
.
Multiple Series
If multiple pairs of x
/y
arguments are provided, multiple lines are plotted:
plot([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)
Style
To set globally, see: