8000 Merge pull request #4565 from tacaswell/doc_rst_cleanup · matplotlib/matplotlib@484c72b · GitHub
[go: up one dir, main page]

Skip to content
< 8000 script crossorigin="anonymous" type="application/javascript" src="https://github.githubassets.com/assets/sessions-eed3aa0554dd.js" defer="defer">

Commit 484c72b

Browse files
committed
Merge pull request #4565 from tacaswell/doc_rst_cleanup
DOC: clean up rst in whats_new folder
2 parents 3f82e0a + bbc440f commit 484c72b

16 files changed

+64
-40
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Artist-level {get,set}_usetex for text
22
--------------------------------------
33

4-
Add `{get,set}_usetex` methods to `text.Text` objects which allow artist-level
4+
Add ``{get,set}_usetex`` methods to `text.Text` objects which allow artist-level
55
control of LaTeX rendering vs the internal mathtex rendering.

doc/users/whats_new/2015-03-03_locator-set_params.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set_params() function, which sets parameters within a Locator type instance,
55
is now available to all Locator types. The implementation also prevents unsafe
66
usage by strictly defining the parameters that a user can set.
77

8-
To use, simply call set_params() on a Locator instance with desired arguments:
8+
To use, simply call ``set_params()`` on a Locator instance with desired arguments:
99
::
1010

1111
loc = matplotlib.ticker.LogLocator()

doc/users/whats_new/autowrap_text.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@ Auto-wrapping Text
33
Added the keyword argument "wrap" to Text, which automatically breaks long lines of text when being drawn.
44
Works for any rotated text, different modes of alignment, and for text that are either labels or titles.
55

6-
Example:
7-
plt.text(1, 1, "This is a really long string that should be wrapped so that it does not go outside the figure.", wrap=True)
6+
Example ::
7+
8+
plt.text(1, 1,
9+
"This is a really long string that should be wrapped so that "
10+
"it does not go outside the figure.", wrap=True)

doc/users/whats_new/axis3d.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Fixed labelpad in Axis3D
2-
```````````````````````````````````
2+
````````````````````````
33

44
Axis3D now looks at xaxis.labelpad (from rcParams or set by
5-
set_xlabel('X LABEL', labelpad=30) or ax.zaxis.labelpad = 20)
6-
to determine the position of axis labels in 3D plots.
5+
``set_xlabel('X LABEL', labelpad=30)`` or ``ax.zaxis.labelpad=20)`` to
6+
determine the position of axis labels in 3D plots.

doc/users/whats_new/cbook.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cbook.is_sequence_of_strings recognizes string objects
22
``````````````````````````````````````````````````````
33

4-
This is primarily how pandas stores a sequence of strings.
4+
This is primarily how pandas stores a sequence of strings ::
55

66
import pandas as pd
77
import matplotlib.cbook as cbook

doc/users/whats_new/datelocators.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Date Locators (derived from :class:`~matplotlib.dates.DateLocator`) now
55
implement the :meth:`~matplotlib.tickers.Locator.tick_values` method.
66
This is expected of all Locators derived from :class:`~matplotlib.tickers.Locator`.
77

8-
The Date Locators can now be used easily without creating axes
8+
The Date Locators can now be used easily without creating axes ::
99

1010
from datetime import datetime
1111
from matplotlib.dates import YearLocator

doc/users/whats_new/linestyles.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Mostly unified linestyles for Lines, Patches and Collections
2-
````````````````````````````````````````````````````````````
1+
Mostly unified linestyles for `Line2D`, `Patche` and `Collection`
2+
`````````````````````````````````````````````````````````````````
33

44
The handling of linestyles for Lines, Patches and Collections has been
55
unified. Now they all support defining linestyles with short symbols,
6-
like `"--"`, as well as with full names, like `"dashed"`. Also the
7-
definition using a dash pattern (`(0., [3., 3.])`) is supported for all
8-
methods using Lines, Patches or Collections.
6+
like `"--"`, as well as with full names, like ``"dashed"``. Also the
7+
definition using a dash pattern (``(0., [3., 3.])``) is supported for all
8+
methods using `Line2D`, `Patche` or ``Collection*``.

doc/users/whats_new/pdfpages_notes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ viewer that has this facility (Adobe Reader, OSX Preview, Skim,
88
etc.). Per default the note itself is kept off-page to prevent it to
99
appear in print-outs.
1010

11-
PdfPages.attach_note needs to be called before savefig in order to be
11+
`PdfPages.attach_note` needs to be called before savefig in order to be
1212
added to the correct figure.

doc/users/whats_new/plotting.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
Plot bar and barh with labels
22
`````````````````````````````
33

4-
Added kwarg "tick_label" to bar and barh to support plotting bar graphs with a
4+
Added kwarg ``"tick_label"`` to `bar` and `barh` to support plotting bar graphs with a
55
text label for each bar.
6-
Example:
7-
bar([1, 2], [1, 1], tick_label=['bar1', 'bar2'])
6+
7+
Example: ::
8+
9+
bar([1, 2], [1, 1], tick_label=['bar1', 'bar2'])
810

911
Added center and frame kwargs to pie
1012
````````````````````````````````````
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
wx backend has been updated
22
---------------------------
3+
34
The wx backend can now be used with both wxPython classic and
45
`Phoenix <http://wxpython.org/Phoenix/docs/html/main.html>`__.
56

67
wxPython classic has to be at least version 2.8.12 and works on Python 2.x. As
7-
of May 2015 no official release of wxPython Phoenix is available but a
8+
of May 2015 no official release of wxPython Phoenix is available but a
89
current snapshot will work on Python 2.7+ and 3.4+.
910

1011
If you have multiple versions of wxPython installed, then the user code is
1112
responsible setting the wxPython version. How to do this is
12-
explained in the comment at the beginning of the example
13+
explained in the comment at the beginning of the example
1314
`examples\user_interfaces\embedding_in_wx2.py`.
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
updated figimage to take optional resize parameter
22
----------------------------------------------------
3-
Added the ability to plot simple 2D-Array using plt.figimage(X, resize=True).
3+
4+
Added the ability to plot simple 2D-Array using ``plt.figimage(X, resize=True)``.
45
This is useful for plotting simple 2D-Array without the Axes or whitespacing
56
around the image.
6-
Example:
7-
data = np.random.random( [500, 500] )
8-
plt.figimage(data, resize=True)
7+
Example::
8+
9+
data = np.random.random( [500, 500] )
10+
plt.figimage(data, resize=True)

doc/users/whats_new/updated_figure.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ Updated Figure.savefig()
33

44
Added support to save the figure with the same dpi as the figure on the screen using dpi='figure'
55

6-
Example:
7-
f = plt.figure(dpi=25) # dpi set to 25
8-
S = plt.scatter([1,2,3],[4,5,6])
9-
f.savefig('output.png', dpi='figure') # output savefig dpi set to 25 (same as figure)
6+
Example::
7+
8+
f = plt.figure(dpi=25) # dpi set to 25
9+
S = plt.scatter([1,2,3],[4,5,6])
10+
f.savefig('output.png', dpi='figure') # output savefig dpi set to 25 (same as figure)
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
Updated fignum_exists to take figure name
1+
Updated fignum_exists to take figure name
22
-------------------------------------------
3+
34
Added the ability to check the existence of a figure using it's name
45
instead of just the figure number.
5-
Example:
6-
figure('figure')
7-
fignum_exists('figure') #true
6+
Example::
7+
8+
figure('figure')
9+
fignum_exists('figure') #true

doc/users/whats_new/updated_scale.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
Logit Scale
22
-----------
3+
34
Added support for the 'logit' axis scale, a nonlinear transformation
4-
`x -> log10(x / (1-x))` for data between 0 and 1 excluded.
5+
6+
.. math::
7+
8+
x -> \log10(x / (1-x))
9+
10+
for data between 0 and 1 excluded.

doc/users/whats_new/updated_table.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
Updated Table and to control edge visibility
22
--------------------------------------------
3+
34
Added the ability to toggle the visibility of lines in Tables.
4-
Functionality added to the table() factory function under the keyword argument "edges".
5-
Values can be the strings "open", "closed", "horizontal", "vertical" or combinations of the letters "L", "R", "T", "B" which represent left, right, top, and bottom respectively.
5+
Functionality added to the table() factory function under the keyword
6+
argument "edges". Values can be the strings "open", "closed",
7+
"horizontal", "vertical" or combinations of the letters "L", "R", "T",
8+
"B" which represent left, right, top, and bottom respectively.
9+
10+
Example::
611

7-
Example:
812
table(..., edges="open") # No line visible
913
table(..., edges="closed") # All lines visible
1014
table(..., edges="horizontal") # Only top and bottom lines visible
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
Moved ``ignore``, ``set_active``, and ``get_active`` methods to base class ``Widget``
2-
`````````````````````````````````````````````````````````````````````````````````
2+
`````````````````````````````````````````````````````````````````````````````````````
3+
34 1241
Pushes up duplicate methods in child class to parent class to avoid duplication of code.
45

56

67
Adds enable/disable feature to MultiCursor
78
``````````````````````````````````````````
8-
A MultiCursor object can be disabled (and enabled) after it has been created without destroying the object.
9-
Example:
10-
multi_cursor.active = False
9+
10+
A MultiCursor object can be disabled (and enabled) after it has been created without destroying the object.
11+
Example::
12+
13+
multi_cursor.active = False

0 commit comments

Comments
 (0)
0