8000 Fixing a mismatch in the documentation. by boushley · Pull Request #828 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fixing a mismatch in the documentation. #828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 16, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
6 changes: 3 additions & 3 deletions doc/users/pyplot_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ functions are directed to the current axes
.. plot:: pyplots/pyplot_simple.py
:include-source:

You may be wondering why the x-axis ranges from 0-2 and the y-axis
from 1-3. If you provide a single list or array to the
You may be wondering why the x-axis ranges from 0-3 and the y-axis
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, but you need to update the y-axis also; it is presently 1-4.

from 1-4. If you provide a single list or array to the
:func:`~matplotlib.pyplot.plot` command, matplotlib assumes it is a
sequence of y values, and automatically generates the x values for
you. Since python ranges start with 0, the default x vector has the
same length as y but starts with 0. Hence the x data are
``[0,1,2]``.
``[0,1,2,3]``.

:func:`~matplotlib.pyplot.plot` is a versatile command, and will take
an arbitrary number of arguments. For example, to plot x versus y,
Expand Down
0