8000 Separate tick and spine examples · timhoffm/matplotlib@481da9b · GitHub
[go: up one dir, main page]

Skip to content

Commit 481da9b

Browse files
committed
Separate tick and spine examples
1 parent 3361895 commit 481da9b

35 files changed

+32
-29
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ per-file-ignores =
120120
examples/style_sheets/plot_solarizedlight2.py: E501
121121
examples/subplots_axes_and_figures/demo_constrained_layout.py: E402
122122
examples/text_labels_and_annotations/custom_legends.py: E402
123-
examples/ticks_and_spines/date_concise_formatter.py: E402
123+
examples/ticks/date_concise_formatter.py: E402
124124
examples/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py: E402
125125
examples/user_interfaces/embedding_in_gtk3_sgskip.py: E402
126126
examples/user_interfaces/embedding_in_gtk4_panzoom_sgskip.py: E402

doc/users/prev_whats_new/whats_new_0.99.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ that denote the data limits -- in various arbitrary locations. No
112112
longer are your axis lines constrained to be a simple rectangle around
113113
the figure -- you can turn on or off left, bottom, right and top, as
114114
well as "detach" the spine to offset it away from the data. See
115-
:doc:`/gallery/ticks_and_spines/spine_placement_demo` and
115+
:doc:`/gallery/spines/spine_placement_demo` and
116116
:class:`matplotlib.spines.Spine`.
117117

118118
.. plot::

examples/axisartist/demo_axisline_style.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
88
Note: The `mpl_toolkits.axisartist` axes classes may be confusing for new
99
users. If the only aim is to obtain arrow heads at the ends of the axes,
10-
rather check out the
11-
:doc:`/gallery/ticks_and_spines/centered_spines_with_arrows` example.
10+
rather check out the :doc:`/gallery/spines/centered_spines_with_arrows`
11+
example.
1212
"""
1313

1414
from mpl_toolkits.axisartist.axislines import AxesZero

examples/axisartist/demo_parasite_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
`mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxes`.
1111
1212
An alternative approach using standard Matplotlib subplots is shown in the
13-
:doc:`/gallery/ticks_and_spines/multiple_yaxis_with_spines` example.
13+
:doc:`/gallery/spines/multiple_yaxis_with_spines` example.
1414
1515
An alternative approach using :mod:`mpl_toolkits.axes_grid1`
1616
and :mod:`mpl_toolkits.axisartist` is found in the

examples/axisartist/demo_parasite_axes2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
`~.mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxes` is the
2020
:doc:`/gallery/axisartist/demo_parasite_axes` example.
2121
An alternative approach using the usual Matplotlib subplots is shown in
22-
the :doc:`/gallery/ticks_and_spines/multiple_yaxis_with_spines` example.
22+
the :doc:`/gallery/spines/multiple_yaxis_with_spines` example.
2323
"""
2424

2525
from mpl_toolkits.axes_grid1 import host_subplot

examples/axisartist/simple_axisartist1.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
This example showcases the use of :mod:`.axisartist` to draw spines at custom
77
positions (here, at ``y = 0``).
88
9-
Note, however, that it is simpler to achieve this effect
10-
using standard `.Spine` methods, as demonstrated in
11-
:doc:`/gallery/ticks_and_spines/centered_spines_with_arrows`.
9+
Note, however, that it is simpler to achieve this effect using standard
10+
`.Spine` methods, as demonstrated in
11+
:doc:`/gallery/spines/centered_spines_with_arrows`.
1212
1313
.. redirect-from:: /gallery/axisartist/simple_axisline2
1414
"""

examples/spines/README.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. _spines_examples:
2+
3+
Spines
4+
======

examples/ticks_and_spines/spine_placement_demo.py renamed to examples/spines/spine_placement_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Adjusting the location and appearance of axis spines.
77
88
Note: If you want to obtain arrow heads at the ends of the axes, also check
9-
out the :doc:`/gallery/ticks_and_spines/centered_spines_with_arrows` example.
9+
out the :doc:`/gallery/spines/centered_spines_with_arrows` example.
1010
"""
1111
import numpy as np
1212
import matplotlib.pyplot as plt
File renamed without changes.

examples/text_labels_and_annotations/date.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616
1717
An alternative formatter is the `~.dates.ConciseDateFormatter`,
1818
used in the second ``Axes`` below (see
19-
:doc:`/gallery/ticks_and_spines/date_concise_formatter`), which often
20-
removes the need to rotate the tick labels. The last ``Axes``
21-
formats the dates manually, using `~.dates.DateFormatter` to
22-
format the dates using the format strings documented at
23-
`datetime.date.strftime`.
19+
:doc:`/gallery/ticks/date_concise_formatter`), which often removes the need to
20+
rotate the tick labels. The last ``Axes`` formats the dates manually, using
21+
`~.dates.DateFormatter` to format the dates using the format strings documented
22+
at `datetime.date.strftime`.
2423
"""
2524

2625
import matplotlib.pyplot as plt

examples/ticks/README.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. _ticks_examples:
2+
3+
Ticks
4+
=====

examples/ticks_and_spines/README.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

lib/matplotlib/dates.py

Lines changed: 7 additions & 7 deletions
F438
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
.. seealso::
2222
2323
- :doc:`/gallery/text_labels_and_annotations/date`
24-
- :doc:`/gallery/ticks_and_spines/date_concise_formatter`
25-
- :doc:`/gallery/ticks_and_spines/date_demo_convert`
24+
- :doc:`/gallery/ticks/date_concise_formatter`
25+
- :doc:`/gallery/ticks/date_demo_convert`
2626
2727
.. _date-format:
2828
@@ -38,7 +38,7 @@
3838
20 microseconds for the rest of the allowable range of dates (year 0001 to
3939
9999). The epoch can be changed at import time via `.dates.set_epoch` or
4040
:rc:`dates.epoch` to other dates if necessary; see
41-
:doc:`/gallery/ticks_and_spines/date_precision_and_epochs` for a discussion.
41+
:doc:`/gallery/ticks/date_precision_and_epochs` for a discussion.
4242
4343
.. note::
4444
@@ -144,7 +144,7 @@
144144
* `RRuleLocator`: Locate using a `matplotlib.dates.rrulewrapper`.
145145
`.rrulewrapper` is a simple wrapper around dateutil_'s `dateutil.rrule` which
146146
allow almost arbitrary date tick specifications. See :doc:`rrule example
147-
</gallery/ticks_and_spines/date_demo_rrule>`.
147+
</gallery/ticks/date_demo_rrule>`.
148148
149149
* `AutoDateLocator`: On autoscale, this class picks the best `DateLocator`
150150
(e.g., `RRuleLocator`) to set the view limits and the tick locations. If
@@ -271,7 +271,7 @@ def set_epoch(epoch):
271271
`~.dates.set_epoch` must be called before any dates are converted
272272
(i.e. near the import section) or a RuntimeError will be raised.
273273
274-
See also :doc:`/gallery/ticks_and_spines/date_precision_and_epochs`.
274+
See also :doc:`/gallery/ticks/date_precision_and_epochs`.
275275
276276
Parameters
277277
----------
@@ -683,7 +683,7 @@ class ConciseDateFormatter(ticker.Formatter):
683683
684684
Examples
685685
--------
686-
See :doc:`/gallery/ticks_and_spines/date_concise_formatter`
686+
See :doc:`/gallery/ticks/date_concise_formatter`
687687
688688
.. plot::
689689
@@ -1659,7 +1659,7 @@ class MicrosecondLocator(DateLocator):
16591659
If you really must use datetime.datetime() or similar and still
16601660
need microsecond precision, change the time origin via
16611661
`.dates.set_epoch` to something closer to the dates being plotted.
1662-
See :doc:`/gallery/ticks_and_spines/date_precision_and_epochs`.
1662+
See :doc:`/gallery/ticks/date_precision_and_epochs`.
16631663
16641664
"""
16651665
def __init__(self, interval=1, tz=None):

lib/matplotlib/ticker.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@
118118
the input ``str``. For function input, a `.FuncFormatter` with the input
119119
function will be generated and used.
120120
121-
See :doc:`/gallery/ticks_and_spines/major_minor_demo` for an
122-
example of setting major and minor ticks. See the :mod:`matplotlib.dates`
123-
module for more information and examples of using date locators and formatters.
121+
See :doc:`/gallery/ticks/major_minor_demo` for an example of setting major
122+
and minor ticks. See the :mod:`matplotlib.dates` module for more information
123+
and examples of using date locators and formatters.
124124
"""
125125

126126
import itertools

0 commit comments

Comments
 (0)
0