1919# Matplotlib graphs your data on `~.figure.Figure`\s (i.e., windows, Jupyter
2020# widgets, etc.), each of which can contain one or more `~.axes.Axes` (i.e., an
2121# area where points can be specified in terms of x-y coordinates (or theta-r
22- # in a polar plot, or x-y-z in a 3D plot, etc.). The most simple way of
22+ # in a polar plot, or x-y-z in a 3D plot, etc.). The simplest way of
2323# creating a figure with an axes is using `.pyplot.subplots`. We can then use
2424# `.Axes.plot` to draw some data on the axes:
2525
3939# In fact, you can do the same in Matplotlib: for each `~.axes.Axes` graphing
4040# method, there is a corresponding function in the :mod:`matplotlib.pyplot`
4141# module that performs that plot on the "current" axes, creating that axes (and
42- # its parent figure) if they don't exist yet. So the previous example can be
42+ # its parent figure) if they don't exist yet. So, the previous example can be
4343# written more shortly as
4444
4545plt .plot ([1 , 2 , 3 , 4 ], [1 , 4 , 2 , 3 ]) # Matplotlib plot.
108108# :class:`~matplotlib.artist.Artist`
109109# ----------------------------------
110110#
111- # Basically everything you can see on the figure is an artist (even the
111+ # Basically, everything you can see on the figure is an artist (even the
112112# `.Figure`, `Axes <.axes.Axes>`, and `~.axis.Axis` objects). This includes
113113# `.Text` objects, `.Line2D` objects, :mod:`.collections` objects, `.Patch`
114114# objects ... (you get the idea). When the figure is rendered, all of the
175175plt .legend ()
176176
177177###############################################################################
178- # Actually there is a third approach, for the case where you are embedding
178+ # In addition, there is a third approach, for the case when embedding
179179# Matplotlib in a GUI application, which completely drops pyplot, even for
180180# figure creation. We won't discuss it here; see the corresponding section in
181181# the gallery for more info (:ref:`user_interfaces`).
200200# ...
201201#
202202# for an even more MATLAB-like style. This approach is strongly discouraged
203- # nowadays and deprecated; it is only mentioned here because you may still
203+ # nowadays and deprecated. It is only mentioned here because you may still
204204# encounter it in the wild.
205205#
206206# Typically one finds oneself making the same plots over and over
@@ -266,17 +266,17 @@ def my_plotter(ax, data1, data2, param_dict):
266266#
267267# A lot of documentation on the website and in the mailing lists refers
268268# to the "backend" and many new users are confused by this term.
269- # matplotlib targets many different use cases and output formats. Some
270- # people use matplotlib interactively from the python shell and have
269+ # Matplotlib targets many different use cases and output formats. Some
270+ # people use Matplotlib interactively from the python shell and have
271271# plotting windows pop up when they type commands. Some people run
272272# `Jupyter <https://jupyter.org>`_ notebooks and draw inline plots for
273- # quick data analysis. Others embed matplotlib into graphical user
273+ # quick data analysis. Others embed Matplotlib into graphical user
274274# interfaces like wxpython or pygtk to build rich applications. Some
275- # people use matplotlib in batch scripts to generate postscript images
275+ # people use Matplotlib in batch scripts to generate postscript images
276276# from numerical simulations, and still others run web application
277277# servers to dynamically serve up graphs.
278278#
279- # To support all of these use cases, matplotlib can target different
279+ # To support all of these use cases, Matplotlib can target different
280280# outputs, and each of these capabilities is called a backend; the
281281# "frontend" is the user facing code, i.e., the plotting code, whereas the
282282# "backend" does all the hard work behind-the-scenes to make the figure.
@@ -343,7 +343,7 @@ def my_plotter(ax, data1, data2, param_dict):
343343# import matplotlib
344344# matplotlib.use('qt5agg')
345345#
346- # This should be done before any figure is created; otherwise Matplotlib may
346+ # This should be done before any figure is created, otherwise Matplotlib may
347347# fail to switch the backend and raise an ImportError.
348348#
349349# Using `~matplotlib.use` will require changes in your code if users want to
@@ -357,16 +357,16 @@ def my_plotter(ax, data1, data2, param_dict):
357357#
358358# By default, Matplotlib should automatically select a default backend which
359359# allows both interactive work and plotting from scripts, with output to the
360- # screen and/or to a file, so at least initially you will not need to worry
360+ # screen and/or to a file, so at least initially, you will not need to worry
361361# about the backend. The most common exception is if your Python distribution
362- # comes without :mod:`tkinter` and you have no other GUI toolkit installed;
363- # this happens on certain Linux distributions, where you need to install a
362+ # comes without :mod:`tkinter` and you have no other GUI toolkit installed.
363+ # This happens on certain Linux distributions, where you need to install a
364364# Linux package named ``python-tk`` (or similar).
365365#
366366# If, however, you want to write graphical user interfaces, or a web
367367# application server (:ref:`howto-webapp`), or need a better
368368# understanding of what is going on, read on. To make things a little
369- # more customizable for graphical user interfaces, matplotlib separates
369+ # more customizable for graphical user interfaces, Matplotlib separates
370370# the concept of the renderer (the thing that actually does the drawing)
371371# from the canvas (the place where the drawing goes). The canonical
372372# renderer for user interfaces is ``Agg`` which uses the `Anti-Grain
@@ -383,7 +383,7 @@ def my_plotter(ax, data1, data2, param_dict):
383383# generate a pixel representation of the line whose accuracy depends on a
384384# DPI setting.
385385#
386- # Here is a summary of the matplotlib renderers (there is an eponymous
386+ # Here is a summary of the Matplotlib renderers (there is an eponymous
387387# backend for each; these are *non-interactive backends*, capable of
388388# writing to a file):
389389#
@@ -484,7 +484,7 @@ def my_plotter(ax, data1, data2, param_dict):
484484# ``pyside`` to use ``PyQt4`` or ``PySide``, respectively.
485485#
486486# Since the default value for the bindings to be used is ``PyQt4``, Matplotlib
487- # first tries to import it, if the import fails, it tries to import ``PySide``.
487+ # first tries to import it. If the import fails, it tries to import ``PySide``.
488488#
489489# Using non-builtin backends
490490# --------------------------
@@ -505,20 +505,20 @@ def my_plotter(ax, data1, data2, param_dict):
505505# and whether a script or shell session continues after a plot
506506# is drawn on the screen, depends on the functions and methods
507507# that are called, and on a state variable that determines whether
508- # matplotlib is in "interactive mode". The default Boolean value is set
508+ # Matplotlib is in "interactive mode". The default Boolean value is set
509509# by the :file:`matplotlibrc` file, and may be customized like any other
510510# configuration parameter (see :doc:`/tutorials/introductory/customizing`). It
511511# may also be set via :func:`matplotlib.interactive`, and its
512512# value may be queried via :func:`matplotlib.is_interactive`. Turning
513513# interactive mode on and off in the middle of a stream of plotting
514514# commands, whether in a script or in a shell, is rarely needed
515- # and potentially confusing, so in the following we will assume all
515+ # and potentially confusing. In the following, we will assume all
516516# plotting is done with interactive mode either on or off.
517517#
518518# .. note::
519519# Major changes related to interactivity, and in particular the
520520# role and behavior of :func:`~matplotlib.pyplot.show`, were made in the
521- # transition to matplotlib version 1.0, and bugs were fixed in
521+ # transition to Matplotlib version 1.0, and bugs were fixed in
522522# 1.0.1. Here we describe the version 1.0.1 behavior for the
523523# primary interactive backends, with the partial exception of
524524# *macosx*.
@@ -558,7 +558,7 @@ def my_plotter(ax, data1, data2, param_dict):
558558# ax.plot([3.1, 2.2])
559559#
560560# If you are using certain backends (like ``macosx``), or an older version
561- # of matplotlib , you may not see the new line added to the plot immediately.
561+ # of Matplotlib , you may not see the new line added to the plot immediately.
562562# In this case, you need to explicitly call :func:`~matplotlib.pyplot.draw`
563563# in order to update the plot::
564564#
@@ -610,7 +610,7 @@ def my_plotter(ax, data1, data2, param_dict):
610610# plt.plot(np.random.rand(10))
611611# plt.show()
612612#
613- # which makes three plots, one at a time. I.e. the second plot will show up,
613+ # This makes three plots, one at a time. I.e., the second plot will show up
614614# once the first plot is closed.
615615#
616616# Summary
@@ -714,7 +714,7 @@ def my_plotter(ax, data1, data2, param_dict):
714714#
715715# plt.plot(x, y, markevery=10)
716716#
717- # The markevery argument allows for naive subsampling, or an
717+ # The `` markevery`` argument allows for naive subsampling, or an
718718# attempt at evenly spaced (along the *x* axis) sampling. See the
719719# :doc:`/gallery/lines_bars_and_markers/markevery_demo`
720720# for more information.
@@ -776,7 +776,7 @@ def my_plotter(ax, data1, data2, param_dict):
776776# import matplotlib.style as mplstyle
777777# mplstyle.use('fast')
778778#
779- # It is very light weight , so it plays nicely with other
779+ # It is very lightweight , so it plays nicely with other
780780# styles, just make sure the fast style is applied last
781781# so that other styles do not overwrite the settings::
782782#
0 commit comments