X Tutup
Skip to content

Added docstring to scatter_with_legend.py [MEP12]#6487

Merged
WeatherGod merged 1 commit intomatplotlib:masterfrom
francoiseprovencher:fix-example
May 27, 2016
Merged

Added docstring to scatter_with_legend.py [MEP12]#6487
WeatherGod merged 1 commit intomatplotlib:masterfrom
francoiseprovencher:fix-example

Conversation

@francoiseprovencher
Copy link
Copy Markdown
Contributor

We added a docstring to the scatter_with_legend.py as part of the PyLadies meetup led by @discardthree

@tacaswell
Copy link
Copy Markdown
Member

👍 will merge after CI passes


Also demonstrates how transparency of the markers
can be adjusted by giving ``alpha`` a value between
0 and 1.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we please showcase this paragraph as an ideal example of an example docstring? Clear and concise, and highlighted exactly what this example demonstrates!

@tacaswell
Copy link
Copy Markdown
Member

We test on pep8 conformance of the source and examples. It looks like there are some trailing whitespaces left. This is something you can configure your editor to automatically remove on save.

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 277, 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: 3 != 0 : Found code syntax errors (and warnings):
/home/travis/build/matplotlib/matplotlib/examples/lines_bars_and_markers/scatter_with_legend.py:2:48: W291 trailing whitespace
/home/travis/build/matplotlib/matplotlib/examples/lines_bars_and_markers/scatter_with_legend.py:4:50: W291 trailing whitespace
/home/travis/build/matplotlib/matplotlib/examples/lines_bars_and_markers/scatter_with_legend.py:5:52: W291 trailing whitespace
----------------------------------------------------------------------

@tacaswell tacaswell added this to the 2.1 (next point release) milestone May 27, 2016
@francoiseprovencher
Copy link
Copy Markdown
Contributor Author

@tacaswell I amended the original commit to remove the trailing whitespaces, should be PEP8 compliant now.

@WeatherGod
Copy link
Copy Markdown
Member

appveyor failure is unrelated (conda server unavailable)

@WeatherGod WeatherGod merged commit 77c23f8 into matplotlib:master May 27, 2016
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

X Tutup