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

Skip to content

DOC: Fix docs for linestyles in contour #23892

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
Sep 15, 2022
Merged
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
31 changes: 16 additions & 15 deletions lib/matplotlib/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,8 +785,8 @@ def __init__(self, ax, *args,
self._transform = transform

self.negative_linestyles = negative_linestyles
# If negative_linestyles was not defined as a kwarg,
# define negative_linestyles with rcParams
# If negative_linestyles was not defined as a keyword argument, define
# negative_linestyles with rcParams
if self.negative_linestyles is None:
self.negative_linestyles = \
mpl.rcParams['contour.negative_linestyle']
Expand Down Expand Up @@ -1746,26 +1746,27 @@ def _initialize_x_y(self, z):
linestyles : {*None*, 'solid', 'dashed', 'dashdot', 'dotted'}, optional
*Only applies to* `.contour`.

If *linestyles* is *None*, the default is 'solid' unless the lines
are monochrome. In that case, negative contours will take their
linestyle from :rc:`contour.negative_linestyle` setting.
If *linestyles* is *None*, the default is 'solid' unless the lines are
monochrome. In that case, negative contours will instead take their
linestyle from the *negative_linestyles* argument.

*linestyles* can also be an iterable of the above strings
specifying a set of linestyles to be used. If this
iterable is shorter than the number of contour levels
it will be repeated as necessary.
*linestyles* can also be an iterable of the above strings specifying a set
of linestyles to be used. If this iterable is shorter than the number of
contour levels it will be repeated as necessary.

negative_linestyles : {*None*, 'solid', 'dashed', 'dashdot', 'dotted'}, \
optional
*Only applies to* `.contour`.

If *negative_linestyles* is None, the default is 'dashed' for
negative contours.
If *linestyles* is *None* and the lines are monochrome, this argument
specifies the line style for negative contours.

*negative_linestyles* can also be an iterable of the above
strings specifying a set of linestyles to be used. If this
iterable is shorter than the number of contour levels
it will be repeated as necessary.
If *negative_linestyles* is *None*, the default is taken from
:rc:`contour.negative_linestyles`.

*negative_linestyles* can also be an iterable of the above strings
specifying a set of linestyles to be used. If this iterable is shorter than
the number of contour levels it will be repeated as necessary.

hatches : list[str], optional
*Only applies to* `.contourf`.
Expand Down