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

Skip to content

Commit 90c84c9

Browse files
committed
style_guide.rst typos, table section, terminology
getting_started.py embedded plot, concise language, formatting
1 parent bfccdaf commit 90c84c9

File tree

3 files changed

+64
-22
lines changed

3 files changed

+64
-22
lines changed
-20.7 KB
Binary file not shown.

doc/devel/style_guide.rst

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ or auxiliary verbs when possible.
9393

9494
Voice
9595
^^^^^
96-
Write in active sentences. Passive voice is best for situations or condtions
96+
Write in active sentences. Passive voice is best for situations or conditions
9797
related to warning prompts.
9898

9999
+------------------------------------+------------------------------------+
@@ -170,6 +170,41 @@ exclusively for performing actions in a determined order.
170170
| functions. | functions. |
171171
+------------------------------------+------------------------------------+
172172

173+
Tables
174+
^^^^^^
175+
Use ASCII tables with reStructuredText standards in organizing content.
176+
Markdown tables and the csv-table directive are not accepted.
177+
178+
+--------------------------------+----------------------------------------+
179+
| Correct | Incorrect |
180+
+================================+========================================+
181+
| +----------+----------+ | :: |
182+
| | Correct | Incorrect| | |
183+
| +==========+==========+ | | Correct | Incorrect | |
184+
| | OK | Not OK | | | ------- | --------- | |
185+
| +----------+----------+ | | OK | Not OK | |
186+
| | |
187+
+--------------------------------+----------------------------------------|
188+
| :: | :: |
189+
| | |
190+
| +----------+----------+ | .. csv-table:: |
191+
| | Correct | Incorrect| | :header: "correct", "incorrect" |
192+
| +==========+==========+ | :widths: 10, 10 |
193+
| | OK | Not OK | | |
194+
| +----------+----------+ | "OK ", "Not OK" |
195+
| | |
196+
+--------------------------------+ |
197+
| :: | |
198+
| | |
199+
| =========== =========== | |
200+
| Correct Incorrect | |
201+
| =========== =========== | |
202+
| OK Not OK | |
203+
| =========== =========== | |
204+
| | |
205+
+--------------------------------+----------------------------------------+
206+
207+
173208
Additional Resources
174209
====================
175210

tutorials/introductory/getting_started.py

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
# +------------------------------------+------------------------------------+
4040
# | Useful for repeated code use, | Helpful for quickly graphing data |
4141
# | generalization, robust | when using interactive |
42-
# | configurations of graphs. | environments. |
42+
# | configurations of visuals. | environments. |
4343
# +------------------------------------+------------------------------------+
4444
# | Recommended to new users for | Most useful for users coming from |
4545
# | learning fundamentals. | MATLAB. Users already familiar with|
@@ -77,8 +77,8 @@
7777
# +====================================+====================================+
7878
# | :: | :: |
7979
# | | |
80-
# | fig, ax = plt.subplots() | plt.plot([1,2,3],[1,2,3]) |
81-
# | ax.plot([1,2,3],[1,2,3]) | |
80+
# | fig, ax = plt.subplots() | plt.plot([1, 2, 3],[1, 2, 3]) |
81+
# | ax.plot([1, 2, 3],[1, 2, 3]) | |
8282
# | | |
8383
# +------------------------------------+------------------------------------+
8484
# | `.pyplot.subplots` generates a | :mod:`matplotlib.pyplot` creates |
@@ -87,12 +87,16 @@
8787
# | `.Axes.plot` plots the data. | elements and `.pyplot.plot` plots |
8888
# | | the data. |
8989
# +------------------------------------+------------------------------------+
90-
#
91-
# .. image:: ../../_static/getting_started_example.png
90+
# | .. plot:: | .. plot:: |
91+
# | | |
92+
# | fig, ax = plt.subplots() | plt.plot([1,2,3],[1,2,3]) |
93+
# | ax.plot([1, 2, 3],[1, 2, 3]) | |
94+
# | | |
95+
# +------------------------------------+------------------------------------+
9296
#
9397
# .. note::
9498
#
95-
# The example image is identical for both explicit and implicit code.
99+
# The example graphs are identical for both explicit and implicit code.
96100
#
97101
# Requirements
98102
# ============
@@ -264,15 +268,18 @@
264268

265269
##############################################################################
266270
#
267-
# The module for the OOP example unpacks the Figure and Axes using a single
268-
# instance of ``pyplot``. This convention uses ``plt.subplots()`` and defaults
269-
# to one Figure, ``fig``, and one Axes, ``ax``. The `Configuration`_ section
270-
# below contains additional information about manipulating visuals, multiple
271-
# visulizations, and other modifications.
271+
# The module ``pyplot`` for the OOP example unpacks the Figure and Axes.
272+
# This convention uses ``plt.subplots()`` and defaults to one Figure, ``fig``,
273+
# and one Axes, ``ax``. The variable names are common shorthand terms. Any
274+
# naming conventions also work.
275+
#
276+
# The `Configuration`_ section below contains additional information about
277+
# manipulating visuals, multiple visualizations, and other modifications.
272278
#
273279
# Using explicit programming allows for ``fig`` and ``ax`` to use separate
274-
# methods to manipulate the visualization. Specific Figures and Axes refer to
275-
# methods in OOP conventions for managing respective data.
280+
# methods to manipulate the visualization. Specific Figures and Axes manage
281+
# data components with their own respective methods.
282+
#
276283
#
277284
# Implicit: ``pyplot``
278285
# --------------------
@@ -327,8 +334,8 @@
327334
#
328335
# The image below depicts each visible element of a Matplotlib graph. The
329336
# graphic uses Matplotlib to display and highlight each individual part of the
330-
# visualization. To view the programming for the image, the source code is
331-
# available at :ref:`sphx_glr_gallery_showcase_anatomy.py`.
337+
# visualization. To view source code for the image, see
338+
# :ref:`sphx_glr_gallery_showcase_anatomy.py`.
332339
#
333340
#
334341
# .. image:: ../../_static/anatomy.png
@@ -369,7 +376,7 @@
369376
# contain multiple types of visualizations of data on a single Axes. Each of
370377
# these types are specific to the Axes they are in.
371378
#
372-
# Matplotlib Axes also intergrate with other Python libraries. In Axes-based
379+
# Matplotlib Axes also integrate with other Python libraries. In Axes-based
373380
# interfaces, other libraries take an Axes object as input. Libraries such as
374381
# `pandas` and `Seaborn <https://seaborn.pydata.org>`_ act on specific Axes.
375382
#
@@ -378,10 +385,10 @@
378385
#
379386
# :class:`~matplotlib.artist.Artist`
380387
#
381-
# Artists are broad Matplotlib objects that display visuals. These are the
382-
# visible elements when the Figure is rendered. They correspond to a specific
383-
# Axes and cannot be shared or transferred. In Matplotlib programming, all
384-
# objects for display are Artists.
388+
# Artists are a broad variety of Matplotlib objects. They display visuals and
389+
# are the visible elements when the Figure is rendered. They correspond to a
390+
# specific Axes and cannot be shared or transferred. In Matplotlib programming,
391+
# all objects for display are Artists.
385392
#
386393
# .. note::
387394
#
@@ -511,7 +518,7 @@
511518
def autopct_format(percent, group):
512519
"""
513520
Takes percent equivalent and calculates original value from data.
514-
Returns fstring of value new line above percentage.
521+
Returns string of value new line above percentage.
515522
516523
Parameters
517524
----------

0 commit comments

Comments
 (0)