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

Skip to content

Commit 542ed8b

Browse files
committed
style_guide.rst referenced in toctree
added basic line plot image for getting_started.py draft complete for review
1 parent dfdc417 commit 542ed8b

File tree

4 files changed

+240
-173
lines changed

4 files changed

+240
-173
lines changed
20.7 KB
Loading

doc/devel/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ process or how to fix something feel free to ask on `gitter
3636
development_setup.rst
3737
testing.rst
3838
documenting_mpl.rst
39+
style_guide.rst
3940
add_new_projection.rst
4041
gitwash/index.rst
4142
coding_guide.rst

doc/devel/style_guide.rst

Lines changed: 58 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,34 @@ There are several key terms in Matplotlib that are standards for
1919
reliability and consistency in documentation. They are case-sensitive and
2020
are not interchangeable.
2121

22-
+----------------------+--------------------------+-------------------------+
23-
| Term | Description | Correct | Incorrect |
24-
+----------------------+--------------------------+-------------------------+
25-
| Figure | Workign space for | | |
26-
| | programming. | | |
27-
+----------------------+--------------------------+-------------------------+
28-
| Axes | Subplots within Figure. | | |
29-
| | Contains Figure elements | | |
30-
| | and is responsible for | | |
31-
| | plotting and configuring | | |
32-
| | additional details. | | |
33-
+----------------------+--------------------------+-------------------------+
34-
| Axis | Refers to visible object | | |
35-
| | corresponding to labeling| | |
36-
| | of plotted data. | | |
37-
+----------------------+--------------------------+-------------------------+
38-
| Artist | Broad Matplotlib object | | |
39-
| | that displays visuals. | | |
40-
+----------------------+--------------------------+-------------------------+
41-
| Object Oriented | Explicit approach of | | |
42-
| Programming (OOP) | programing in Matplotlib.| | |
43-
+----------------------+--------------------------+-------------------------+
22+
+------------------+--------------------------+--------------+--------------+
23+
| Term | Description | Correct | Incorrect |
24+
+==================+==========================+==============+==============+
25+
| Figure | Matplotlib working space |- One Figure |- One figure |
26+
| | for programming. |- 11 Figures |- 11 figures |
27+
+------------------+--------------------------+--------------+--------------+
28+
| Axes | Subplots within Figure. | - One Axes | - One axes |
29+
| | Contains Figure elements | - Four Axes | - Four Axeses|
30+
| | and is responsible for | - 32 Axes | - 32 Axii |
31+
| | plotting and configuring | | |
32+
| | additional details. | | |
33+
+------------------+--------------------------+--------------+--------------+
34+
| Artist | Broad Matplotlib object | - One Artist | - One artist |
35+
| | that displays visuals. | - Two Artists| - Two artists|
36+
+------------------+--------------------------+--------------+--------------+
37+
| Axis | Refers to visible object | - One Axis | - One axis |
38+
| | corresponding to labeling| - Four Axis | - Four Axises|
39+
| | of plotted data. | objects | - 32 Axes |
40+
+------------------+--------------------------+--------------+--------------+
41+
| Explicit, | Explicit approach of | - Explicit | - object |
42+
| Object Oriented | programing in Matplotlib.| - explicit | oriented |
43+
| Programming (OOP)| | - OOP | - OO-style |
44+
+------------------+--------------------------+--------------+--------------+
45+
| Implicit, | Implicit approach of | - Implicit | - MATLAB like|
46+
| ``pyplot`` | programming in Matplotlib| - implicit | - Pyplot |
47+
| | with ``pyplot`` module. | - ``pyplot`` | - pyplot |
48+
| | | | interface |
49+
+------------------+--------------------------+--------------+--------------+
4450

4551

4652
Grammar
@@ -52,11 +58,11 @@ The audience is the "user" in the documentation. A "user" is a person
5258
programming in Python with the Matplotlib library.
5359

5460
Use second-person sentences for instructions directed at user for specifying
55-
an action.
61+
an action or a possessive reference.
5662

5763
+------------------------------------+------------------------------------+
5864
| Correct | Incorrect |
59-
+------------------------------------+------------------------------------+
65+
+====================================+====================================+
6066
| Users install Matplotlib from the | You can install Matplotlib from the|
6167
| source directory using the Python | source directory. You can find |
6268
| ``pip`` installer program. | additional support if you are |
@@ -71,12 +77,12 @@ or auxiliary verbs when possible.
7177

7278
+------------------------------------+------------------------------------+
7379
| Correct | Incorrect |
74-
+------------------------------------+------------------------------------+
80+
+====================================+====================================+
7581
| The fundamental ideas behind | Matplotlib will take data and |
7682
| Matplotlib for visualization | transform it through functions and |
77-
| involve taking data and | methods. This should be the basic |
78-
| transforming it thorugh functions | fundamental idea behind Matplotlib |
79-
| and methods. | for visualizations. |
83+
| involve taking data and | methods. They can generate many |
84+
| transforming it through functions | kinds of visuals. These will be the|
85+
| and methods. | fundamentals for using Matplotlib. |
8086
+------------------------------------+------------------------------------+
8187

8288
Voice
@@ -86,7 +92,7 @@ related to warning prompts.
8692

8793
+------------------------------------+------------------------------------+
8894
| Correct | Incorrect |
89-
+------------------------------------+------------------------------------+
95+
+====================================+====================================+
9096
| The function ``plot`` generates the| The graph is generated by the |
9197
| graph. | ``plot`` function. |
9298
+------------------------------------+------------------------------------+
@@ -97,13 +103,13 @@ related to warning prompts.
97103

98104
Sentence structure
99105
^^^^^^^^^^^^^^^^^^
100-
Write wih short sentences using Subject-Verb-Object order regularly. Limit
106+
Write with short sentences using Subject-Verb-Object order regularly. Limit
101107
how frequently coordinating conjunctions appear in sentences. Avoid pronoun
102108
referenes and subordinating conjunctive prhases.
103109

104110
+------------------------------------+------------------------------------+
105111
| Correct | Incorrect |
106-
+------------------------------------+------------------------------------+
112+
+====================================+====================================+
107113
| The ``pyplot`` module in Matplotlib| The ``pyplot`` module in Matplotlib|
108114
| is a collection of functions. These| is a collection of functions which |
109115
| functions create, manage, and | create, manage, and manipulate the |
@@ -115,18 +121,23 @@ referenes and subordinating conjunctive prhases.
115121
| corresponds to the respective | respective Figure. |
116122
| Figure. | |
117123
+------------------------------------+------------------------------------+
124+
| The implicit approach is a | Users that wish to have convenient |
125+
| convenient shortcut for | shortcuts for generating plots use |
126+
| generating simple plots. | the implicit approach. |
127+
+------------------------------------+------------------------------------+
128+
118129

119130
Formatting
120131
==========
121132

122133
Matplotlib uses reStructuredText Markup for documentation. Sphinx helps to
123-
transform these documents into proper formats for access and visibility.
134+
transform these documents into appropriate formats for accessibility and
135+
visibility.
124136

125137
reStructuredText standards
126138
--------------------------
127-
128-
https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html
129-
https://docutils.sourceforge.io/docs/user/rst/quickref.html
139+
- https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html
140+
- https://docutils.sourceforge.io/docs/user/rst/quickref.html
130141

131142

132143
Lists
@@ -136,19 +147,21 @@ Numbered Lists are exclusively for performing actions in specific order.
136147

137148
+------------------------------------+------------------------------------+
138149
| Correct | Incorrect |
139-
+------------------------------------+------------------------------------+
150+
+====================================+====================================+
140151
| The example uses three graphs. | The example uses three graphs. |
141-
| - Bar | 1. Bar |
142-
| - Line | 2. Line |
143-
| - Pie | 3. Pie |
144152
+------------------------------------+------------------------------------+
145-
| These three steps help to get | The following steps are important |
153+
| - Bar | 1. Bar |
154+
| - Line | 2. Line |
155+
| - Pie | 3. Pie |
156+
+------------------------------------+------------------------------------+
157+
| These four steps help to get | The following steps are important |
146158
| started using Matplotlib. | to get started using Matplotlib. |
147-
| 1. Import the Matplotlib library. | - Import the Matplotlib library. |
148-
| 2. Import the necessary modules. | - Import the necessary modules. |
149-
| 3. Set and assign data to work on. | - Set and assign data to work on. |
150-
| 4. Transform data with methods and | - Transform data with methods and |
151-
| functions. | functions. |
159+
+------------------------------------+------------------------------------+
160+
| 1. Import the Matplotlib library. | - Import the Matplotlib library. |
161+
| 2. Import the necessary modules. | - Import the necessary modules. |
162+
| 3. Set and assign data to work on.| - Set and assign data to work on. |
163+
| 4. Transform data with methods and| - Transform data with methods and |
164+
| functions. | functions. |
152165
+------------------------------------+------------------------------------+
153166

154167
Additional Resources
@@ -158,8 +171,3 @@ Additional Resources
158171
* `IBM Style Guide <https://www.ibm.com/developerworks/library/styleguidelines/>`_
159172
* `Google Developer Style Guide <https://developers.google.com/style>`_
160173

161-
+------------------------------------+------------------------------------+
162-
| Correct | Incorrect |
163-
+------------------------------------+------------------------------------+
164-
| | |
165-
+------------------------------------+------------------------------------+

0 commit comments

Comments
 (0)