Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dcde8d2

Browse files
timhoffmQuLogic
andauthored
Apply suggestions from code review
Co-authored-by: Elliott Sales de Andrade <[email protected]>
1 parent ed817a0 commit dcde8d2

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

galleries/tutorials/compact_api.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
66
Matplotlib's primary and universal API is the :ref:`Axes interface <api_interfaces>`.
77
While it is clearly structured and powerful, it can sometimes feel overly verbose and
8-
thus cumbersome to write. This page collects patterns how to condense the code
9-
of the Axes-based API and achieve the same results with less typing for many simpler
8+
thus cumbersome to write. This page collects patterns for condensing the code
9+
of the Axes-based API and achieving the same results with less typing for many simpler
1010
plots.
1111
1212
.. note::
1313
1414
The :ref:`pyplot interface <pyplot_interface>` is an alternative more compact
15-
interface, and was historically modeled to be similar to MATLAB. It's remains a
15+
interface, and was historically modeled to be similar to MATLAB. It remains a
1616
valid approach for those who want to use it. However, it has the disadvantage that
17-
it achieves the brevity through implicit assumptions that you have to understand.
17+
it achieves its brevity through implicit assumptions that you have to understand.
1818
1919
Since it follows a different paradigm, switching between the Axes interface and
2020
the pyplot interface requires a shift of the mental model, and some code rewrite,
@@ -45,7 +45,7 @@
4545

4646
# %%
4747
# Note that we've included ``plt.show()`` here. This is needed to show the plot window
48-
# when running from a commandline or in a python script. If you run a jupyter notebook,
48+
# when running from a command line or in a Python script. If you run a Jupyter notebook,
4949
# this command is automatically executed at the end of each cell.
5050
#
5151
# For the rest of the tutorial, we'll assume that we are in a notebook and leave this
@@ -57,7 +57,7 @@
5757
# Collect Axes properties into a single ``set()`` call
5858
# ====================================================
5959
#
60-
# The properties of Matplotlib Artists can be modified through the respective
60+
# The properties of Matplotlib Artists can be modified through their respective
6161
# ``set_*()`` methods. Artists additionally have a generic ``set()`` method, that takes
6262
# keyword arguments and is equivalent to calling all the respective ``set_*()`` methods.
6363
# ::
@@ -148,7 +148,7 @@
148148
#
149149
# Using implicit figure creation
150150
# ==============================
151-
# You can go even further by taping into the pyplot logic and use `.pyplot.axes` to
151+
# You can go even further by tapping into the pyplot logic and use `.pyplot.axes` to
152152
# create the axes:
153153

154154
ax = plt.axes(xlabel="day", ylabel="daylight hours", title="London")
@@ -164,7 +164,7 @@
164164
# Not storing a reference to the Axes
165165
# ===================================
166166
# If you only need to visualize one dataset, you can append the plot command
167-
# directly to the Axes creation. This may be useful e.g. in notebooks notebooks,
167+
# directly to the Axes creation. This may be useful e.g. in notebooks,
168168
# where you want to create a plot with some configuration, but as little distracting
169169
# code as possible:
170170

0 commit comments

Comments
 (0)