-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Numpy Doc Format #7424
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
Numpy Doc Format #7424
Changes from all commits
38873bb
7517d00
a481143
3e47ee0
5b705a0
58f1169
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
# Written by Robert Cimrman | ||
|
||
from __future__ import print_function | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
from six.moves import input | ||
|
||
import time | ||
from multiprocessing import Process, Pipe | ||
import numpy as np | ||
|
@@ -76,10 +78,6 @@ def main(): | |
for ii in range(10): | ||
pl.plot() | ||
time.sleep(0.5) | ||
try: | ||
input = raw_input | ||
except NameError: | ||
pass | ||
input('press Enter...') | ||
pl.plot(finished=True) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2918,17 +2918,29 @@ def get_xscale(self): | |
get_xscale.__doc__ = "Return the xaxis scale string: %s""" % ( | ||
", ".join(mscale.get_scale_names())) | ||
|
||
@docstring.dedent_interpd | ||
def set_xscale(self, value, **kwargs): | ||
""" | ||
Set the x-axis scale | ||
|
||
Set the scaling of the x-axis: %(scale)s | ||
Parameters | ||
---------- | ||
value : {"linear", "log", "symlog", "logit"} | ||
scaling strategy to apply | ||
|
||
ACCEPTS: [%(scale)s] | ||
Notes | ||
----- | ||
Different kwargs are accepted, depending on the scale. See | ||
the `~matplotlib.scale` module for more information. | ||
|
||
Different kwargs are accepted, depending on the scale: | ||
%(scale_docs)s | ||
See also | ||
-------- | ||
matplotlib.scale.LinearScale : linear transfrom | ||
|
||
matplotlib.scale.LogTransform : log transform | ||
|
||
matplotlib.scale.SymmetricalLogTransform : symlog transform | ||
|
||
matplotlib.scale.LogisticTransform : logit transform | ||
""" | ||
# If the scale is being set to log, clip nonposx to prevent headaches | ||
# around zero | ||
|
@@ -2998,18 +3010,22 @@ def get_xticklabels(self, minor=False, which=None): | |
self.xaxis.get_ticklabels(minor=minor, | ||
which=which)) | ||
|
||
@docstring.dedent_interpd | ||
def set_xticklabels(self, labels, fontdict=None, minor=False, **kwargs): | ||
""" | ||
Set the xtick labels with list of strings *labels* | ||
Set the xtick labels with list of string labels | ||
|
||
Return a list of axis text instances. | ||
Parameters | ||
---------- | ||
labels : list of str | ||
list of string labels | ||
|
||
*kwargs* set the :class:`~matplotlib.text.Text` properties. | ||
Valid properties are | ||
%(Text)s | ||
Returns | ||
------- | ||
A list of `~matplotlib.text.Text` instances | ||
|
||
ACCEPTS: sequence of strings | ||
Other Parameters | ||
----------------- | ||
**kwargs : `~matplotlib.text.Text` properties. | ||
""" | ||
if fontdict is not None: | ||
kwargs.update(fontdict) | ||
|
@@ -3139,7 +3155,6 @@ def set_ylim(self, bottom=None, top=None, emit=True, auto=False, **kw): | |
0 m, is at the top. | ||
|
||
>>> set_ylim(5000, 0) | ||
|
||
""" | ||
if 'ymin' in kw: | ||
bottom = kw.pop('ymin') | ||
|
@@ -3199,16 +3214,29 @@ def get_yscale(self): | |
get_yscale.__doc__ = "Return the yaxis scale string: %s""" % ( | ||
", ".join(mscale.get_scale_names())) | ||
|
||
@docstring.dedent_interpd | ||
def set_yscale(self, value, **kwargs): | ||
"""Set the y-axis scale | ||
""" | ||
Set the y-axis scale | ||
|
||
Parameters | ||
---------- | ||
value : {"linear", "log", "symlog", "logit"} | ||
scaling strategy to apply | ||
|
||
Notes | ||
----- | ||
Different kwargs are accepted, depending on the scale. See | ||
the `~matplotlib.scale` module for more information. | ||
|
||
See also | ||
-------- | ||
matplotlib.scale.LinearScale : linear transfrom | ||
|
||
Set the scaling of the y-axis: %(scale)s | ||
matplotlib.scale.LogTransform : log transform | ||
|
||
ACCEPTS: [%(scale)s] | ||
matplotlib.scale.SymmetricalLogTransform : symlog transform | ||
|
||
Different kwargs are accepted, depending on the scale: | ||
%(scale_docs)s | ||
matplotlib.scale.LogisticTransform : logit transform | ||
""" | ||
# If the scale is being set to log, clip nonposy to prevent headaches | ||
# around zero | ||
|
@@ -3281,18 +3309,22 @@ def get_yticklabels(self, minor=False, which=None): | |
self.yaxis.get_ticklabels(minor=minor, | ||
which=which)) | ||
|
||
@docstring.dedent_interpd | ||
def set_yticklabels(self, labels, fontdict=None, minor=False, **kwargs): | ||
""" | ||
Set the y tick labels with list of strings *labels* | ||
Set the y-tick labels with list of strings labels | ||
|
||
Return a list of :class:`~matplotlib.text.Text` instances. | ||
Parameters | ||
---------- | ||
labels : list of str | ||
list of string labels | ||
|
||
*kwargs* set :class:`~matplotlib.text.Text` properties for the labels. | ||
Valid properties are | ||
%(Text)s | ||
Returns | ||
------- | ||
A list of `~matplotlib.text.Text` instances. | ||
|
||
ACCEPTS: sequence of strings | ||
Other Parameters | ||
---------------- | ||
**kwargs : `~matplotlib.text.Text` properties. | ||
""" | ||
if fontdict is not None: | ||
kwargs.update(fontdict) | ||
|
@@ -3872,15 +3904,21 @@ def twinx(self): | |
""" | ||
Create a twin Axes sharing the xaxis | ||
|
||
create a twin of Axes for generating a plot with a sharex | ||
x-axis but independent y axis. The y-axis of self will have | ||
Create a twin of Axes for generating a plot with a shared | ||
x-axis but independent y-axis. The y-axis of self will have | ||
ticks on left and the returned axes will have ticks on the | ||
right. To ensure tick marks of both axis align, see | ||
:class:`~matplotlib.ticker.LinearLocator` | ||
`~matplotlib.ticker.LinearLocator` | ||
|
||
.. note:: | ||
For those who are 'picking' artists while using twinx, pick | ||
events are only called for the artists in the top-most axes. | ||
Returns | ||
------- | ||
Axis | ||
The newly created axis | ||
|
||
Notes | ||
----- | ||
For those who are 'picking' artists while using twinx, pick | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs a |
||
events are only called for the artists in the top-most axes. | ||
""" | ||
ax2 = self._make_twin_axes(sharex=self) | ||
ax2.yaxis.tick_right() | ||
|
@@ -3895,14 +3933,20 @@ def twiny(self): | |
""" | ||
Create a twin Axes sharing the yaxis | ||
|
||
create a twin of Axes for generating a plot with a shared | ||
y-axis but independent x axis. The x-axis of self will have | ||
Create a twin of Axes for generating a plot with a shared | ||
y-axis but independent x-axis. The x-axis of self will have | ||
ticks on bottom and the returned axes will have ticks on the | ||
top. | ||
|
||
.. note:: | ||
For those who are 'picking' artists while using twiny, pick | ||
events are only called for the artists in the top-most axes. | ||
Returns | ||
------- | ||
Axis | ||
The newly created axis | ||
|
||
Notes | ||
------ | ||
For those who are 'picking' artists while using twiny, pick | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs a |
||
events are only called for the artists in the top-most axes. | ||
""" | ||
|
||
ax2 = self._make_twin_axes(sharey=self) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you've mostly reverted the first commit, so I'm a bit confused here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal was to revert the first commit. There is a latex header problem (hence the htmlonly).