From 913b5a054b141287589e298886ea51aa02cddde5 Mon Sep 17 00:00:00 2001 From: Rushabh Prajapati <67200681+HenftyKnight@users.noreply.github.com> Date: Mon, 22 Nov 2021 09:19:56 -0700 Subject: [PATCH 1/2] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 067f70e..76efd0a 100644 --- a/README.rst +++ b/README.rst @@ -1299,7 +1299,7 @@ command from within a python session: :: >>> import matplotlib.pyplot as plt - >>> help(plt) + >>> help(plt.plot) Help on function plot in module matplotlib.pyplot: plot(*args, **kwargs) From 04206abbec8a969c7dac5962205cdd6edc4d7bbd Mon Sep 17 00:00:00 2001 From: Rushabh Prajapati <67200681+HenftyKnight@users.noreply.github.com> Date: Mon, 22 Nov 2021 09:38:50 -0700 Subject: [PATCH 2/2] Update README.rst --- README.rst | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/README.rst b/README.rst index 76efd0a..f1170ae 100644 --- a/README.rst +++ b/README.rst @@ -1302,25 +1302,39 @@ command from within a python session: >>> help(plt.plot) Help on function plot in module matplotlib.pyplot: - plot(*args, **kwargs) - Plot lines and/or markers to the - :class:`~matplotlib.axes.Axes`. *args* is a variable length - argument, allowing for multiple *x*, *y* pairs with an - optional format string. For example, each of the following is - legal:: - - plot(x, y) # plot x and y using default line style and color - plot(x, y, 'bo') # plot x and y using blue circle markers - plot(y) # plot y using x as index array 0..N-1 - plot(y, 'r+') # ditto, but with red plusses - - If *x* and/or *y* is 2-dimensional, then the corresponding columns - will be plotted. + plot(*args, scalex=True, scaley=True, data=None, **kwargs) + Plot y versus x as lines and/or markers. + + Call signatures:: + + plot([x], y, [fmt], *, data=None, **kwargs) + plot([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs) + + The coordinates of the points or line nodes are given by *x*, *y*. + + The optional parameter *fmt* is a convenient way for defining basic + formatting like color, marker and linestyle. It's a shortcut string + notation described in the *Notes* section below. + + >>> plot(x, y) # plot x and y using default line style and color + >>> plot(x, y, 'bo') # plot x and y using blue circle markers + >>> plot(y) # plot y using x as index array 0..N-1 + >>> plot(y, 'r+') # ditto, but with red plusses + + You can use `.Line2D` properties as keyword arguments for more + control on the appearance. Line properties and *fmt* can be mixed. + The following two calls yield identical results: + + >>> plot(x, y, 'go--', linewidth=2, markersize=12) + >>> plot(x, y, color='green', marker='o', linestyle='dashed', + ... linewidth=2, markersize=12) + + When conflicting with *fmt*, keyword arguments take precedence. ... Galleries --------- - + The `matplotlib gallery `_ is also incredibly useful when you search how to render a given graphic. Each example comes with its source.