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

Skip to content

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

Merged
merged 6 commits into from
Jan 16, 2017
Merged

Numpy Doc Format #7424

merged 6 commits into from
Jan 16, 2017

Conversation

sirlittle
Copy link
Contributor

Changed some documentation to be in Numpy Doc format for set_xlim, set_ylim, etc. Also removed extra line from the documentation.

@@ -3796,7 +3796,7 @@ def dopatch(xs, ys, **kwargs):
def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
vmin=None, vmax=None, alpha=None, linewidths=None,
verts=None, edgecolors=None,
**kwargs):
**kx`wargs):
Copy link
Contributor

Choose a reason for hiding this comment

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

accidentally commited?

@@ -2800,7 +2800,9 @@ def get_xlim(self):
return tuple(self.viewLim.intervalx)

def set_xlim(self, left=None, right=None, emit=True, auto=False, **kw):
"""
"""
set_xlim(self, left, right, emit, auto, **kwargs)
Copy link
Member

Choose a reason for hiding this comment

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

@NelleV haven't we been removing these because they are redundent?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I removed as many as I could without losing information; please don't add them back.

@tacaswell
Copy link
Member

Something funny went on with that merge from master. Can you try re-basing this on top of current master See http://matplotlib.org/devdocs/devel/gitwash/development_workflow.html?highlight=rebase#rebasing-a-pull-request-pr

Please ping me if you need more help with rebasing.

@@ -3796,7 +3796,7 @@ def dopatch(xs, ys, **kwargs):
def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
vmin=None, vmax=None, alpha=None, linewidths=None,
verts=None, edgecolors=None,
**kwargs):
**kxwargs):
Copy link
Member

Choose a reason for hiding this comment

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

It's kwargs.

If possible, please squash that last commit (and any others modifying this line) into the second commit.

@tacaswell tacaswell added this to the 2.0.1 (next bug fix release) milestone Nov 9, 2016
@@ -214,6 +214,11 @@ When using the `STIX <http://www.stixfonts.org/>`_ fonts, you also have the choi
``\mathfrak{Fraktur}`` :math-stix:`\mathfrak{Fraktur}`
``\mathsf{sansserif}`` :math-stix:`\mathsf{sansserif}`
``\mathrm{\mathsf{sansserif}}`` :math-stix:`\mathrm{\mathsf{sansserif}}`
====================================== =========================================

.. htmlonly::
Copy link
Member

Choose a reason for hiding this comment

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

This commit reverts the first commit and adds a bunch of trailing whitespace.

@NelleV
Copy link
Member

NelleV commented Nov 15, 2016

This looks good, but next time please open a new pull request for each ticket you fix.
Can you also add the list of tickets this PR closes?

@sirlittle
Copy link
Contributor Author

This pull request is supposed to solve #7205 and #7388.

Copy link
Member

@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

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

Small typos and such.

@@ -2,6 +2,7 @@
# Demo of using multiprocessing for generating data in one process and plotting
# in another.
# Written by Robert Cimrman
from six.moves import input

from __future__ import print_function
Copy link
Member

Choose a reason for hiding this comment

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

__future__ imports must be the first line of code in the file; the six import belongs after it.

# make up data.
#npts = int(raw_input('enter # of random points to plot:'))
#npts = int(input('enter # of random points to plot:'))
Copy link
Member

Choose a reason for hiding this comment

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

Might as well just remove this line instead (and the six import can be dropped.)

@@ -5,6 +5,8 @@
from matplotlib.widgets import LassoSelector
from matplotlib.path import Path

from six.moves import input

try:
raw_input
Copy link
Member

Choose a reason for hiding this comment

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

This try/except is trying to do the same thing as your six import; it should be removed now.

@@ -216,7 +216,7 @@ When using the `STIX <http://www.stixfonts.org/>`_ fonts, you also have the choi
``\mathrm{\mathsf{sansserif}}`` :math-stix:`\mathrm{\mathsf{sansserif}}`
====================================== =========================================

.. htmlonly::
.. htmlonly::
Copy link
Member

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.

Copy link
Member

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).

ACCEPTS: [%(scale)s]
Parameters
----------
value: float
Copy link
Member

Choose a reason for hiding this comment

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

Missing space before the colon.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is true at all; it accepts the strings defined here.

Return a list of :class:`~matplotlib.text.Text` instances.
Returns
-------
list of str
Copy link
Member

Choose a reason for hiding this comment

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

The description says otherwise.

%(Text)s
Other Parameters
----------------
*kwargs* set the :class:`~matplotlib.text.Text` properties.
Copy link
Member

Choose a reason for hiding this comment

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

A different format than set_xticklabels.

@@ -3868,15 +3884,19 @@ def twinx(self):
"""
Create a twin Axes sharing the xaxis

create a twin of Axes for generating a plot with a sharex
Create a twin of Axes for generating a plot with a sharex
Copy link
Member

Choose a reason for hiding this comment

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

sharex -> shared

Axis
The newly created axis

For those who are 'picking' artists while using twinx, pick
Copy link
Member

Choose a reason for hiding this comment

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

Needs a Notes heading.

Axis
The newly created axis

For those who are 'picking' artists while using twiny, pick
Copy link
Member

Choose a reason for hiding this comment

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

Needs a Notes heading.

@NelleV
Copy link
Member

NelleV commented Nov 16, 2016

Hi @sirlittle
Don't worry about the last elements to be done on this PR. I'll fix them.
On the other hand, please do not push anything onto your remote master branch until this is merged.
Thanks,

@NelleV NelleV changed the title Numpy Doc Format [MRG] Numpy Doc Format Nov 29, 2016
@NelleV NelleV modified the milestones: 2.1 (next point release), 2.0.1 (next bug fix release) Dec 17, 2016
@NelleV NelleV force-pushed the master branch 3 times, most recently from 009913b to 3340dcd Compare December 18, 2016 16:57
@codecov-io
Copy link

codecov-io commented Dec 18, 2016

Current coverage is 62.05% (diff: 100%)

Merging #7424 into master will decrease coverage by 4.40%

@@             master      #7424   diff @@
==========================================
  Files           109        174     +65   
  Lines         46766      56147   +9381   
  Methods           0          0           
  Messages          0          0           
  Branches          0          0           
==========================================
+ Hits          31080      34842   +3762   
- Misses        15686      21305   +5619   
  Partials          0          0           

Powered by Codecov. Last update 8c5b548...e7b3c31

@NelleV
Copy link
Member

NelleV commented Dec 18, 2016

I suspect the failing test here is unrelated to the patch but it is a test that is failing consistently.

@NelleV NelleV assigned NelleV and sirlittle and unassigned sirlittle Dec 19, 2016
@NelleV NelleV changed the title [MRG] Numpy Doc Format [MRG+1] Numpy Doc Format Dec 19, 2016
Copy link
Member

@NelleV NelleV left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

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

A couple small typos.

Set the scaling of the x-axis: %(scale)s
Parameters
----------
value : ["linear", "log", "symlog", "logit"]
Copy link
Member

Choose a reason for hiding this comment

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

Should be braces.


Parameters
----------
value : ["linear", "log", "symlog", "logit"]
Copy link
Member

Choose a reason for hiding this comment

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

Braces here, too.

def set_yticklabels(self, labels, fontdict=None, minor=False, **kwargs):
"""
Set the y tick labels with list of strings *labels*
Set the xtick labels with list of strings labels
Copy link
Member

Choose a reason for hiding this comment

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

x -> y

Copy link
Member

Choose a reason for hiding this comment

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

Nice catch.

@NelleV
Copy link
Member

NelleV commented Jan 13, 2017

Comments have been addressed (and I rebase against matplotlib/master and pushed force…).

@tacaswell tacaswell merged commit b6709ea into matplotlib:master Jan 16, 2017
@tacaswell
Copy link
Member

Thanks!

@QuLogic QuLogic changed the title [MRG+1] Numpy Doc Format Numpy Doc Format Jan 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants