Skip to content

Dedent overindented rst bullet lists. #11699

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 1 commit into from
Jul 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
86 changes: 41 additions & 45 deletions doc/devel/add_new_projection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,23 @@ Adding a new scale consists of defining a subclass of
:class:`matplotlib.scale.ScaleBase`, that includes the following
elements:

- A transformation from data coordinates into display coordinates.
- A transformation from data coordinates into display coordinates.

- An inverse of that transformation. This is used, for example, to
convert mouse positions from screen space back into data space.
- An inverse of that transformation. This is used, for example, to
convert mouse positions from screen space back into data space.

- A function to limit the range of the axis to acceptable values
(``limit_range_for_scale()``). A log scale, for instance, would
prevent the range from including values less than or equal to
zero.
- A function to limit the range of the axis to acceptable values
(``limit_range_for_scale()``). A log scale, for instance, would
prevent the range from including values less than or equal to zero.

- Locators (major and minor) that determine where to place ticks in
the plot, and optionally, how to adjust the limits of the plot to
some "good" values. Unlike ``limit_range_for_scale()``, which is
always enforced, the range setting here is only used when
automatically setting the range of the plot.
- Locators (major and minor) that determine where to place ticks in
the plot, and optionally, how to adjust the limits of the plot to
some "good" values. Unlike ``limit_range_for_scale()``, which is
always enforced, the range setting here is only used when
automatically setting the range of the plot.

- Formatters (major and minor) that specify how the tick labels
should be drawn.
- Formatters (major and minor) that specify how the tick labels
should be drawn.

Once the class is defined, it must be registered with matplotlib so
that the user can select it.
Expand All @@ -75,51 +74,48 @@ Adding a new projection consists of defining a projection axes which
subclasses :class:`matplotlib.axes.Axes` and includes the following
elements:

- A transformation from data coordinates into display coordinates.
- A transformation from data coordinates into display coordinates.

- An inverse of that transformation. This is used, for example, to
convert mouse positions from screen space back into data space.
- An inverse of that transformation. This is used, for example, to
convert mouse positions from screen space back into data space.

- Transformations for the gridlines, ticks and ticklabels. Custom
projections will often need to place these elements in special
locations, and matplotlib has a facility to help with doing so.
- Transformations for the gridlines, ticks and ticklabels. Custom
projections will often need to place these elements in special
locations, and matplotlib has a facility to help with doing so.

- Setting up default values (overriding
:meth:`~matplotlib.axes.Axes.cla`), since the defaults for a
rectilinear axes may not be appropriate.
- Setting up default values (overriding :meth:`~matplotlib.axes.Axes.cla`),
since the defaults for a rectilinear axes may not be appropriate.

- Defining the shape of the axes, for example, an elliptical axes,
that will be used to draw the background of the plot and for
clipping any data elements.
- Defining the shape of the axes, for example, an elliptical axes, that will be
used to draw the background of the plot and for clipping any data elements.

- Defining custom locators and formatters for the projection. For
example, in a geographic projection, it may be more convenient to
display the grid in degrees, even if the data is in radians.
- Defining custom locators and formatters for the projection. For
example, in a geographic projection, it may be more convenient to
display the grid in degrees, even if the data is in radians.

- Set up interactive panning and zooming. This is left as an
"advanced" feature left to the reader, but there is an example of
this for polar plots in :mod:`matplotlib.projections.polar`.
- Set up interactive panning and zooming. This is left as an
"advanced" feature left to the reader, but there is an example of
this for polar plots in :mod:`matplotlib.projections.polar`.

- Any additional methods for additional convenience or features.
- Any additional methods for additional convenience or features.

Once the projection axes is defined, it can be used in one of two ways:

- By defining the class attribute ``name``, the projection axes can be
registered with :func:`matplotlib.projections.register_projection`
and subsequently simply invoked by name::
- By defining the class attribute ``name``, the projection axes can be
registered with :func:`matplotlib.projections.register_projection`
and subsequently simply invoked by name::

plt.axes(projection='my_proj_name')
plt.axes(projection='my_proj_name')

- For more complex, parameterisable projections, a generic "projection"
object may be defined which includes the method ``_as_mpl_axes``.
``_as_mpl_axes`` should take no arguments and return the projection's
axes subclass and a dictionary of additional arguments to pass to the
subclass' ``__init__`` method. Subsequently a parameterised projection
can be initialised with::
- For more complex, parameterisable projections, a generic "projection" object
may be defined which includes the method ``_as_mpl_axes``. ``_as_mpl_axes``
should take no arguments and return the projection's axes subclass and a
dictionary of additional arguments to pass to the subclass' ``__init__``
method. Subsequently a parameterised projection can be initialised with::

plt.axes(projection=MyProjection(param1=param1_value))
plt.axes(projection=MyProjection(param1=param1_value))

where MyProjection is an object which implements a ``_as_mpl_axes`` method.
where MyProjection is an object which implements a ``_as_mpl_axes`` method.


A full-fledged and heavily annotated example is in
Expand Down
30 changes: 14 additions & 16 deletions doc/devel/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ local FreeType build

The following software is required to run the tests:

- pytest_ (>=3.4)
- Ghostscript_ (to render PDF files)
- Inkscape_ (to render SVG files)
- pytest_ (>=3.4)
- Ghostscript_ (to render PDF files)
- Inkscape_ (to render SVG files)

Optionally you can install:

- pytest-cov_ (>=2.3.1) to collect coverage information
- pytest-pep8_ to test coding standards
- pytest-timeout_ to limit runtime in case of stuck tests
- pytest-xdist_ to run tests in parallel
- pytest-cov_ (>=2.3.1) to collect coverage information
- pytest-pep8_ to test coding standards
- pytest-timeout_ to limit runtime in case of stuck tests
- pytest-xdist_ to run tests in parallel


Running the tests
Expand Down Expand Up @@ -188,16 +188,14 @@ a feature dependent on that backend.
There are two optional keyword arguments to the `image_comparison`
decorator:

- `extensions`: If you only wish to test additional image formats
(rather than just `png`), pass any additional file types in the
list of the extensions to test. When copying the new
baseline files be sure to only copy the output files, not their
conversions to ``png``. For example only copy the files
ending in ``pdf``, not in ``_pdf.png``.
- `extensions`: If you only wish to test additional image formats (rather than
just `png`), pass any additional file types in the list of the extensions to
test. When copying the new baseline files be sure to only copy the output
files, not their conversions to ``png``. For example only copy the files
ending in ``pdf``, not in ``_pdf.png``.

- `tol`: This is the image matching tolerance, the default `1e-3`.
If some variation is expected in the image between runs, this
value may be adjusted.
- `tol`: This is the image matching tolerance, the default `1e-3`. If some
variation is expected in the image between runs, this value may be adjusted.

Known failing tests
-------------------
Expand Down
34 changes: 17 additions & 17 deletions doc/users/dflt_style_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,12 @@ Plotting functions
The following changes were made to the default behavior of
`~matplotlib.axes.Axes.scatter`

- The default size of the elements in a scatter plot is now based on
the rcParam ``lines.markersize`` so it is consistent with ``plot(X,
Y, 'o')``. The old value was 20, and the new value is 36 (6^2).
- scatter markers no longer have a black edge.
- if the color of the markers is not specified it will follow the
property cycle, pulling from the 'patches' cycle on the ``Axes``.
- The default size of the elements in a scatter plot is now based on
the rcParam ``lines.markersize`` so it is consistent with ``plot(X,
Y, 'o')``. The old value was 20, and the new value is 36 (6^2).
- Scatter markers no longer have a black edge.
- If the color of the markers is not specified it will follow the
property cycle, pulling from the 'patches' cycle on the ``Axes``.

.. plot::

Expand Down Expand Up @@ -323,10 +323,10 @@ a per-call basis pass the following kwargs::
The following changes were made to the default behavior of
`~matplotlib.axes.Axes.plot`

- the default linewidth increased from 1 to 1.5
- the dash patterns associated with ``'--'``, ``':'``, and ``'-.'`` have
changed
- the dash patterns now scale with line width
- the default linewidth increased from 1 to 1.5
- the dash patterns associated with ``'--'``, ``':'``, and ``'-.'`` have
changed
- the dash patterns now scale with line width


.. plot::
Expand Down Expand Up @@ -642,18 +642,18 @@ Hatching

The color of the lines in the hatch is now determined by

- If an edge color is explicitly set, use that for the hatch color
- If the edge color is not explicitly set, use ``rcParam['hatch.color']`` which
is looked up at artist creation time.
- If an edge color is explicitly set, use that for the hatch color
- If the edge color is not explicitly set, use ``rcParam['hatch.color']`` which
is looked up at artist creation time.

The width of the lines in a hatch pattern is now configurable by the
rcParams `hatch.linewidth`, which defaults to 1 point. The old
behavior for the line width was different depending on backend:

- PDF: 0.1 pt
- SVG: 1.0 pt
- PS: 1 px
- Agg: 1 px
- PDF: 0.1 pt
- SVG: 1.0 pt
- PS: 1 px
- Agg: 1 px

The old line width behavior can not be restored across all backends
simultaneously, but can be restored for a single backend by setting::
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy