Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Minor doc markup fixes. #9262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 29, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Minor doc markup fixes.
  • Loading branch information
anntzer committed Oct 29, 2017
commit c7ef6585c927ad4d11fedf41e15142090d8c07a9
28 changes: 13 additions & 15 deletions 28 lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3056,28 +3056,27 @@ def set_xticklabels(self, labels, fontdict=None, minor=False, **kwargs):
Parameters
----------
labels : list of str
list of string labels
List of string labels.

fontdict : dict, optional
A dictionary controlling the appearance of the ticklabels,
the default `fontdict` is:
A dictionary controlling the appearance of the ticklabels.
The default `fontdict` is::

{'fontsize': rcParams['axes.titlesize'],
'fontweight' : rcParams['axes.titleweight'],
'fontweight': rcParams['axes.titleweight'],
'verticalalignment': 'baseline',
'horizontalalignment': loc}

minor : bool, optional
If True select the minor ticklabels,
else select the major ticklabels
Whether to set the minor ticklabels rather than the major ones.

Returns
-------
A list of `~matplotlib.text.Text` instances
A list of `~.Text` instances.

Other Parameters
-----------------
**kwargs : `~matplotlib.text.Text` properties.
**kwargs : `~.Text` properties.
"""
if fontdict is not None:
kwargs.update(fontdict)
Expand Down Expand Up @@ -3374,25 +3373,24 @@ def set_yticklabels(self, labels, fontdict=None, minor=False, **kwargs):
list of string labels

fontdict : dict, optional
A dictionary controlling the appearance of the ticklabels,
the default `fontdict` is::
A dictionary controlling the appearance of the ticklabels.
The default `fontdict` is::

{'fontsize': rcParams['axes.titlesize'],
'fontweight' : rcParams['axes.titleweight'],
'fontweight': rcParams['axes.titleweight'],
'verticalalignment': 'baseline',
'horizontalalignment': loc}

minor : bool, optional
If True select the minor ticklabels,
else select the major ticklabels
Whether to set the minor ticklabels rather than the major ones.

Returns
-------
A list of `~matplotlib.text.Text` instances.
A list of `~.Text` instances.

Other Parameters
----------------
**kwargs : `~matplotlib.text.Text` properties.
**kwargs : `~.Text` properties.
"""
if fontdict is not None:
kwargs.update(fontdict)
Expand Down
2 changes: 1 addition & 1 deletion 2 lib/matplotlib/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ def add_subplot(self, *args, **kwargs):
grid with J rows and K columns.

projection : ['aitoff' | 'hammer' | 'lambert' | \
'mollweide', 'polar' | 'rectilinear'], optional
'mollweide' | 'polar' | 'rectilinear'], optional
The projection type of the axes.

polar : boolean, optional
Expand Down
79 changes: 37 additions & 42 deletions 79 lib/matplotlib/ticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,99 +38,94 @@
The Locator subclasses defined here are

:class:`NullLocator`
No ticks
No ticks.

:class:`FixedLocator`
Tick locations are fixed
Tick locations are fixed.

:class:`IndexLocator`
locator for index plots (e.g., where x = range(len(y)))
Locator for index plots (e.g., where ``x = range(len(y))``).

:class:`LinearLocator`
evenly spaced ticks from min to max
Evenly spaced ticks from min to max.

:class:`LogLocator`
logarithmically ticks from min to max
Logarithmically ticks from min to max.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Logarithmically spaced"?


:class:`SymmetricalLogLocator`
locator for use with with the symlog norm, works like the
`LogLocator` for the part outside of the threshold and add 0 if
inside the limits
Locator for use with with the symlog norm; works like `LogLocator` for the
part outside of the threshold and add 0 if inside the limits.

:class:`MultipleLocator`
ticks and range are a multiple of base; either integer or float
Ticks and range are a multiple of base; either integer or float.

:class:`OldAutoLocator`
choose a MultipleLocator and dyamically reassign it for
intelligent ticking during navigation
Choose a `MultipleLocator` and dyamically reassign it for intelligent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"dyamically" -> "dynamically".

ticking during navigation.

:class:`MaxNLocator`
finds up to a max number of ticks at nice locations
Finds up to a max number of ticks at nice locations.

:class:`AutoLocator`
:class:`MaxNLocator` with simple defaults. This is the default
tick locator for most plotting.
`MaxNLocator` with simple defaults. This is the default tick locator for
most plotting.

:class:`AutoMinorLocator`
locator for minor ticks when the axis is linear and the
major ticks are uniformly spaced. It subdivides the major
Locator for minor ticks when the axis is linear and the
major ticks are uniformly spaced. Subdivides the major
tick interval into a specified number of minor intervals,
defaulting to 4 or 5 depending on the major interval.

:class:`LogitLocator`
Locator for logit scaling.


There are a number of locators specialized for date locations - see
the dates module
the `dates` module.

You can define your own locator by deriving from Locator. You must
override the ``__call__`` method, which returns a sequence of locations,
and you will probably want to override the autoscale method to set the
view limits from the data limits.

If you want to override the default locator, use one of the above or a
custom locator and pass it to the x or y axis instance. The relevant
methods are::
If you want to override the default locator, use one of the above or a custom
locator and pass it to the x or y axis instance. The relevant methods are::

ax.xaxis.set_major_locator( xmajorLocator )
ax.xaxis.set_minor_locator( xminorLocator )
ax.yaxis.set_major_locator( ymajorLocator )
ax.yaxis.set_minor_locator( yminorLocator )
ax.xaxis.set_major_locator(xmajor_locator)
ax.xaxis.set_minor_locator(xminor_locator)
ax.yaxis.set_major_locator(ymajor_locator)
ax.yaxis.set_minor_locator(yminor_locator)

The default minor locator is the NullLocator, e.g., no minor ticks on by
default.
The default minor locator is `NullLocator`, i.e., no minor ticks on by default.

Tick formatting
---------------

Tick formatting is controlled by classes derived from Formatter. The
formatter operates on a single tick value and returns a string to the
axis.
Tick formatting is controlled by classes derived from Formatter. The formatter
operates on a single tick value and returns a string to the axis.

:class:`NullFormatter`
No labels on the ticks
No labels on the ticks.

:class:`IndexFormatter`
Set the strings from a list of labels
Set the strings from a list of labels.

:class:`FixedFormatter`
Set the strings manually for the labels
Set the strings manually for the labels.

:class:`FuncFormatter`
User defined function sets the labels
User defined function sets the labels.

:class:`StrMethodFormatter`
Use string `format` method
Use string `format` method.

:class:`FormatStrFormatter`
Use an old-style sprintf format string
Use an old-style sprintf format string.

:class:`ScalarFormatter`
Default formatter for scalars: autopick the format string
Default formatter for scalars: autopick the format string.

:class:`LogFormatter`
Formatter for log axes
Formatter for log axes.

:class:`LogFormatterExponent`
Format values for log axis using ``exponent = log_base(value)``.
Expand Down Expand Up @@ -158,10 +153,10 @@
To control the major and minor tick label formats, use one of the
following methods::

ax.xaxis.set_major_formatter( xmajorFormatter )
ax.xaxis.set_minor_formatter( xminorFormatter )
ax.yaxis.set_major_formatter( ymajorFormatter )
ax.yaxis.set_minor_formatter( yminorFormatter )
ax.xaxis.set_major_formatter(xmajor_formatter)
ax.xaxis.set_minor_formatter(xminor_formatter)
ax.yaxis.set_major_formatter(ymajor_formatter)
ax.yaxis.set_minor_formatter(yminor_formatter)

See :ref:`sphx_glr_gallery_ticks_and_spines_major_minor_demo.py` for an
example of setting major and minor ticks. See the :mod:`matplotlib.dates`
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.