Skip to content

Commit c645236

Browse files
minor syntax fix
1 parent f865d96 commit c645236

File tree

1 file changed

+7
-7
lines changed
  • content/matplotlib/concepts/pyplot/terms/plot

1 file changed

+7
-7
lines changed

content/matplotlib/concepts/pyplot/terms/plot/plot.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ Line plots are ideal for illustrating how data changes over time or across conti
2222
## Syntax
2323

2424
```pseudo
25-
matplotlib.pyplot.plot(x, y, fmt='', data=None, **kwargs)
25+
matplotlib.pyplot.plot(*args, scalex=True, scaley=True, data=None, **kwargs)
2626
```
2727

2828
**Parameters:**
2929

30-
- `x`: Sequence of x-axis coordinates.
31-
- `y`: Sequence of y-axis coordinates.
32-
- `fmt`: (Optional) A format string defining line style, marker, and color (e.g., 'ro--' for red circles with a dashed line).
33-
- `data`: (Optional) DataFrame or dict from which variables are extracted.
34-
- `**kwargs`: Additional keyword arguments for customization, such as color, linewidth, marker, or label.
30+
- `*args`: Values for y, or x and y, optionally followed by a format string.
31+
- `scalex`: Auto-scale the x-axis (default True).
32+
- `scaley`: Auto-scale the y-axis (default True).
33+
- `data`: Optional dict or DataFrame for referencing variables by name.
34+
- `**kwargs`: Style and configuration options like color, label, linewidth, marker.
3535

3636
**Return value:**
3737

@@ -64,7 +64,7 @@ plt.grid(True, linestyle='--', alpha=0.6)
6464
plt.show()
6565
```
6666

67-
This example visualizes the relationship between an independent variable, X-axis, and a dependent variable, Y-axis, using a single continuous line. The plot shows the change in Y values as X increases from 1.0 to 5.0.
67+
This example visualizes the relationship between an independent variable, X-axis, and a dependent variable, Y-axis, using a single continuous line. The plot shows the change in Y values as X increases from 1.0 to 5.0. This plot highlights a few useful details worth noting:
6868

6969
- Single Series: The plot displays one series of data, represented by a single blue line, showing the progression of the Y-axis value relative to the X-axis value.
7070
- Data Points and Trend: The line connects the following data points: $(1.0, 2.0)$, $(2.0, 4.0)$, $(3.0, 1.0)$, $(4.0, 6.0)$, and $(5.0, 3.0)$. The plot illustrates clear changes in direction: an initial increase, a sharp decrease, a significant increase to the maximum value, and a final decrease.

0 commit comments

Comments
 (0)