Skip to content

2.0 Examples fixes. See #6762 #6786

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 2 commits into from
Jul 19, 2016
Merged

Conversation

mlub
Copy link
Contributor

@mlub mlub commented Jul 18, 2016

These are fixes for all issues found in axes_grid, color, and
event_handling sections on the examples page.

axisartist/demo_curvelinear_grid.py - Set linewidth=2.0 and grid zorder=0 so
the plotted lines actually visible

event_handling/keypress_demo.py - added usage instruction as axes title

event_handling/lasso_demo.py - added usage instruction as axes title

event_handling/looking_glass.py - added usage instruction as axes title

event_handling/resample.py - removed scikits and hardcoded wave file dependencies
and instead create a sample signal within the script

event_handling/trifinder_event_demo.py - zip(l1,l2) call changed to
list(zip(l1,l2)) to be python3 compatible

event_handling/viewlims.py - The focus box that is supposed to appear in the
left axes when user zooms in the right axes wasn't visible. Set linewidth=1.0

These are fixes for all issues found in axes_grid, color, and
event_handling sections on the examples page.

axis_grid/demo_colorbar_with_inset_locator.py - changed interpolation from the
default(previously bilinear now none) to 'bilinear' to match 1.5.1 example

axes_grid1/simple_axesgrid.py - set interpolation to bilinear

axisartist/demo_curvelinear_grid.py - Set linewidth=2.0 and grid zorder=0 so
the plotted lines actually visible

event_handling/keypress_demo.py - added usage instruction as axes title

event_handling/lasso_demo.py - added usage instruction as axes title

event_handling/looking_glass.py - added usage instruction as axes title

event_handling/resample.py - removed gtk and hardcoded wave file dependencies
and just created a sample signal within the script

event_handling/trifinder_event_demo.py - zip(l1,l2) call changed to
list(zip(l1,l2)) to be python3 compatible

event_handling/viewlims.py - The focus box that is supposed to appear in the
left axes when user zooms in the right axes wasn't visible. Set linewidth=1.0
@tacaswell
Copy link
Member

Thanks!

I am 👎 on changing the examples back to bilinear.

It looks like this put a bunch of pep8 issues in

======================================================================
FAIL: matplotlib.tests.test_coding_standards.test_pep8_conformance_examples
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python3.5/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/travis/build/matplotlib/matplotlib/lib/matplotlib/tests/test_coding_standards.py", line 274, in test_pep8_conformance_examples
    expected_bad_files=expected_bad_files)
  File "/home/travis/build/matplotlib/matplotlib/lib/matplotlib/tests/test_coding_standards.py", line 143, in assert_pep8_conformance
    assert_equal(result.total_errors, 0, msg)
AssertionError: 6 != 0 : Found code syntax errors (and warnings):
/home/travis/build/matplotlib/matplotlib/examples/event_handling/looking_glass.py:15:1: E302 expected 2 blank lines, found 1
/home/travis/build/matplotlib/matplotlib/examples/event_handling/resample.py:35:23: E231 missing whitespace after ','
/home/travis/build/matplotlib/matplotlib/examples/event_handling/resample.py:35:27: E231 missing whitespace after ','
/home/travis/build/matplotlib/matplotlib/examples/event_handling/resample.py:36:62: E703 statement ends with a semicolon
/home/travis/build/matplotlib/matplotlib/examples/event_handling/resample.py:43:31: E231 missing whitespace after ','
/home/travis/build/matplotlib/matplotlib/examples/event_handling/resample.py:51:1: W391 blank line at end of file
----------------------------------------------------------------------

We decided a long time ago to enforce a code style via the package formally known as pep8.

If I recall correctly, you use emacs. I suggest installing elpy in emacs and flake8 in your python enviroment to get pep8 linting in emacs.

@tacaswell tacaswell added this to the 2.0 (style change major release) milestone Jul 18, 2016
These are fixes for all issues found in axes_grid, color, and
event_handling sections on the examples page.

axisartist/demo_curvelinear_grid.py - Set linewidth=2.0 and grid zorder=0 so
the plotted lines actually visible

event_handling/keypress_demo.py - added usage instruction as axes title

event_handling/lasso_demo.py - added usage instruction as axes title

event_handling/looking_glass.py - added usage instruction as axes title

event_handling/resample.py - removed gtk and hardcoded wave file dependencies
and just created a sample signal within the script

event_handling/trifinder_event_demo.py - zip(l1,l2) call changed to
list(zip(l1,l2)) to be python3 compatible

event_handling/viewlims.py - The focus box that is supposed to appear in the
left axes when user zooms in the right axes wasn't visible. Set linewidth=1.0
@mlub
Copy link
Contributor Author

mlub commented Jul 19, 2016

Removed the bilinear mods and corrected the pep8 issues @tacaswell

@tacaswell tacaswell merged commit 2bf445d into matplotlib:master Jul 19, 2016
@tacaswell
Copy link
Member

🎉 Congratulations on what (I think) is your first contribution to mpl!

Documentation is someplace that we do not put enough effort into and this work is greatly appreciated.

tacaswell added a commit that referenced this pull request Jul 19, 2016
@tacaswell
Copy link
Member

backported to v2.x as 2bf445d

@QuLogic
Copy link
Member

QuLogic commented Oct 16, 2016

The backport is actually 8396451.

@anntzer anntzer mentioned this pull request Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants