Skip to content

Adds docstrings to demo_curvelinear_grid.py and demo_curvelinear_grid… #7250

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 20, 2016

Conversation

trpham
Copy link
Contributor

@trpham trpham commented Oct 11, 2016

No description provided.

@tacaswell tacaswell added this to the 2.0.1 (next bug fix release) milestone Oct 11, 2016
@tacaswell
Copy link
Member

It looks like some extraneous files got committed. Can you remove those from the git history and then force push?


# make sure you are on your working branch
$ git checkout 7206-MEP12-compliant-Plots
# do this a bunch of times 
$ git rm file_name
# ammend the last commit
$ git commit --amend 
# _FORCE_ push to github.
# this is dangerous, use with caution
$ git push trpham 7206-MEP12-compliant-Plots --force

Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

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

Need to remove extra files.

@NelleV
Copy link
Member

NelleV commented Oct 11, 2016

Hi @trpham
In addition to @tacaswell's comment to remove the ipython notebook files, can you be a bit more specific in the docstring?
Specifically, I am looking for a docstring with a short title and a description, formatted as is:

"""
title

description
"""

@@ -1,3 +1,17 @@
"""
Demo of defining curvilinear coordinate using GridHelperCurveLinear and Transformation.
Copy link
Member

Choose a reason for hiding this comment

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

The docstring looks good overall, but here is a couple of improvements you should make:

  • Let's try to make the title shorter: something like "Curvilinear coordinates" would be better.
  • Add a sentence at the beginning of the paragraph to introduce it: This examples illustrates how to define curvilinar coordinates using GridHelperCurveLinear and Transformation".

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.

I'm not really sure about this docstring; it mostly seems to echo what's in the comments in the code itself. The docstring should be more of a "why do this?" rather than "what are we doing?".

@@ -1,3 +1,17 @@
"""
Demo of defining curvilinear coordinate using GridHelperCurveLinear and Transformation.
Copy link
Member

Choose a reason for hiding this comment

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

Please wrap at 79 characters.

"""
Demo of defining curvilinear coordinate using GridHelperCurveLinear and Transformation.
In curvelinear_test1: Use GridHelper class
* User provides two transformtions function between curved coordinate and rectlinear coordinate
Copy link
Member

Choose a reason for hiding this comment

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

transformations; rectilinear.

In curvelinear_test1: Use GridHelper class
* User provides two transformtions function between curved coordinate and rectlinear coordinate
* Calling GridHelperCurveLinear on those two functions.
* Setting a subplot positioned by the given gird definition
Copy link
Member

Choose a reason for hiding this comment

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

grid

* Calling GridHelperCurveLinear on those two functions.
* Setting a subplot positioned by the given gird definition
In curvelinear_test2: Use Affine2D transform
* Calling PolerTransform
Copy link
Member

Choose a reason for hiding this comment

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

PolarTransform

* Setting a subplot positioned by the given gird definition
In curvelinear_test2: Use Affine2D transform
* Calling PolerTransform
* Setting the range of coordinate using Extream Finder
Copy link
Member

@QuLogic QuLogic Oct 11, 2016

Choose a reason for hiding this comment

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

coordinates; Extreme

* Setting the range of coordinate using Extream Finder
* Locate the coordinate with LocatorDMS and format them with FormatterDMS
* Calling GridHelperCurveLinear
* Setting a subplot positioned by the given gird definition
Copy link
Member

Choose a reason for hiding this comment

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

grid

@trpham trpham force-pushed the 7206-MEP12-compliant-Plots branch from 10e9bea to aacb002 Compare October 13, 2016 22:16
@NelleV
Copy link
Member

NelleV commented Oct 14, 2016

Hi @trpham
The docstring is not formatted as I'd like: we need both a title and a description for each plot. The title can be much shorter and to the point. I realize that those examples are very complicated to understand, and the function they use often undocumented.
Here is a suggestion:

"""
Custom grid and ticklines.

This example demonstrates how to use GridHelperCurveLinear to define custom grids and ticklines by applying a transformation on the grid. This can be used, as showcase on the second plot, to create polar projections in a rectangular box.
"""

You can leave the second example as is. I think it needs to be removed or updated to be interesting.

@NelleV NelleV changed the title Adds docstrings to demo_curvelinear_grid.py and demo_curvelinear_grid… [MRG+1] Adds docstrings to demo_curvelinear_grid.py and demo_curvelinear_grid… Oct 17, 2016
@QuLogic
Copy link
Member

QuLogic commented Oct 18, 2016

The first commit has a confusing commit message; no files were removed at the time.

@NelleV NelleV merged commit c8ba52f into matplotlib:master Oct 20, 2016
@NelleV
Copy link
Member

NelleV commented Oct 21, 2016

@tacaswell Why has this been tagged for 2.0? This is not a bug fix.

@QuLogic QuLogic changed the title [MRG+1] Adds docstrings to demo_curvelinear_grid.py and demo_curvelinear_grid… Adds docstrings to demo_curvelinear_grid.py and demo_curvelinear_grid… Oct 22, 2016
QuLogic pushed a commit to QuLogic/matplotlib that referenced this pull request Oct 22, 2016
…lots

Adds docstrings to demo_curvelinear_grid.py and demo_curvelinear_grid…
@QuLogic
Copy link
Member

QuLogic commented Oct 22, 2016

Backported to v2.x via bceea0c.

@QuLogic QuLogic modified the milestones: 2.0.1 (next bug fix release), 2.0 (style change major release) Dec 7, 2016
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.

5 participants