FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Plot directive by mdboom · Pull Request #66 · matplotlib/matplotlib · GitHub

Repository navigation

Plot directive - #66

Closed
mdboom wants to merge 11 commits into
matplotlib:masterfrom
mdboom:plot_directive
Closed

mdboom wants to merge 11 commits into
matplotlib:masterfrom
mdboom:plot_directive

Conversation

mdboom commented Mar 31, 2011

Copy link
Copy Markdown
Member

This is a manually-intensive merge of the features Numpy's version of plot_directive that were missing from matplotlib's version. This allows the Numpy documentation to be build using matplotlib's plot_directive and addresses Numpy bug #1074:

http://projects.scipy.org/numpy/ticket/1074

Comment thread CHANGELOG Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This second entry in the CHANGELOG doesn't belong in this commit.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Sure. Fixed.

ddale commented Apr 2, 2011

Copy link
Copy Markdown
Contributor

I tried building the docs on master with this patch. There are a few errors, many of which may not be directly related to these changes:

/home/darren/.local/lib/python2.7/site-packages/matplotlib/patches.py:docstring of matplotlib.patches.FancyBboxPatch.set_boxstyle:27: (WARNING/2) Block quote ends without a blank line; unexpected unindent.

/home/darren/.local/lib/python2.7/site-packages/matplotlib/axes.py:docstring of matplotlib.axes.Axes.plot_date:97: (ERROR/3) Unexpected indentation.

/home/darren/.local/lib/python2.7/site-packages/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.TimerBase:12: (ERROR/3) Unexpected indentation.

/home/darren/.local/lib/python2.7/site-packages/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.TimerBase:15: (WARNING/2) Block quote ends without a blank line; unexpected unindent.

/home/darren/.local/lib/python2.7/site-packages/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.TimerBase:23: (ERROR/3) Unexpected indentation.

/home/darren/.local/lib/python2.7/site-packages/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.TimerBase:24: (WARNING/2) Block quote ends without a blank line; unexpected unindent.

/home/darren/.local/lib/python2.7/site-packages/matplotlib/collections.py:docstring of matplotlib.collections.EllipseCollection:14: (WARNING/2) Block quote ends without a blank line; unexpected unindent.

/home/darren/.local/lib/python2.7/site-packages/matplotlib/pyplot.py:docstring of matplotlib.pyplot.grid:35: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.

/home/darren/.local/lib/python2.7/site-packages/matplotlib/pyplot.py:docstring of matplotlib.pyplot.plot_date:97: (ERROR/3) Unexpected indentation.

/home/darren/.local/lib/python2.7/site-packages/matplotlib/pyplot.py:docstring of matplotlib.pyplot.subplots:28: (WARNING/2) Bullet list ends without a blank line; unexpected unindent.

/home/darren/.local/lib/python2.7/site-packages/matplotlib/pyplot.py:docstring of matplotlib.pyplot.subplots:49: (WARNING/2) Bullet list ends without a blank line; unexpected unindent.

/home/darren/.local/lib/python2.7/site-packages/matplotlib/sphinxext/plot_directive.py:docstring of matplotlib.sphinxext.plot_directive:28: (ERROR/3) Unexpected indentation.

/home/darren/.local/lib/python2.7/site-packages/matplotlib/sphinxext/plot_directive.py:docstring of matplotlib.sphinxext.plot_directive:37: (ERROR/3) Unexpected indentation.

/home/darren/Projects/matplotlib/doc/examples/units/artist_tests.rst:8: (WARNING/2) Exception occurred in plotting  artist_tests: Traceback (most recent call last):
  File "/home/darren/.local/lib/python2.7/site-packages/matplotlib/sphinxext/plot_directive.py", line 469, in run_code
    exec code in ns
  File "<string>", line 30, in <module>
  File "/home/darren/.local/lib/python2.7/site-packages/matplotlib/collections.py", line 852, in __init__
    self.set_segments(segments)
  File "/home/darren/.local/lib/python2.7/site-packages/matplotlib/collections.py", line 861, in set_segments
    seg = np.asarray(seg, np.float_)
  File "/home/darren/.local/lib/python2.7/site-packages/numpy/core/numeric.py", line 284, in asarray
    return array(a, dtype, copy=False, order=order)
ValueError: setting an array element with a sequence.

I've seen ValueErrors like this before.:

np.array([1,2,[3]])
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/home/darren/<ipython-input-2-b02047aaeaaf> in <module>()
----> 1 np.array([1,2,[3]])

ValueError: setting an array element with a sequence.

It probably means that at least one of the values in "segments" is bad, perhaps new plot_directive uncovered an existing problem in doc/examples/units/artist_tests.rst? This line in particular looks suspect (although I am not familiar enough with units support to know for sure):

verts.append(zip(*inch*10*np.random.rand(2, random.randint(2,15))))

Here are a few additional errors I see when I build the docs:

/home/darren/Projects/matplotlib/doc/users/legend_guide.rst:282: WARNING: undecodable source characters, replacing with "?": 'plots. Also, it includes an entry for >>>\xa1<<<\xb0tuple\xa1\xb1 which is mapped to'
/home/darren/Projects/matplotlib/doc/users/legend_guide.rst:282: WARNING: undecodable source characters, replacing with "?": 'plots. Also, it includes an entry for \xa1>>>\xb0<<<tuple\xa1\xb1 which is mapped to'
/home/darren/Projects/matplotlib/doc/users/legend_guide.rst:282: WARNING: undecodable source characters, replacing with "?": 'plots. Also, it includes an entry for \xa1\xb0tuple>>>\xa1<<<\xb1 which is mapped to'
/home/darren/Projects/matplotlib/doc/users/legend_guide.rst:282: WARNING: undecodable source characters, replacing with "?": 'plots. Also, it includes an entry for \xa1\xb0tuple\xa1>>>\xb1<<< which is mapped to'

checking consistency... /home/darren/Projects/matplotlib/doc/devel/gitwash/dot2_dot3.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/animate_decay_tk_blit.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/animation_blit_fltk.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/animation_blit_gtk.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/animation_blit_gtk2.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/animation_blit_qt.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/animation_blit_qt4.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/animation_blit_tk.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/animation_blit_wx.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/draggable_legend.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/dynamic_collection.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/dynamic_image_gtkagg.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/dynamic_image_wxagg2.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/gtk_timeout.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/histogram_tkagg.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/movie_demo.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/simple_anim_gtk.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/simple_anim_tkagg.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/simple_idle_wx.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/animation/simple_timer_wx.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/index.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/examples/pngsuite/index.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/faq/environment_variables_faq.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/mpl_toolkits/axes_grid/index.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/mpl_toolkits/mplot3d/index.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/users/arraydata.rst:: WARNING: document isn't included in any toctree
/home/darren/Projects/matplotlib/doc/users/plotting.rst:: WARNING: document isn't included in any toctree

mdboom commented Apr 3, 2011

Copy link
Copy Markdown
Member Author

I believe most of these errors and warnings are resolved by this pull request:

#63

You may want to merge both to test.

There are still some warnings we have been unable to get to the bottom of. See the comments in that pull request.

ddale commented Apr 3, 2011

Copy link
Copy Markdown
Contributor

In that case, would you consider merging my minor_doc_fixes branch into yours (just filed a pull request), closing this pull request (without merging into master) and then merging the plot_directive branch into the minor_doc_fixes branch? That way, it will be much easier to test and track down the remaining issues.

mdboom commented Apr 4, 2011

Copy link
Copy Markdown
Member Author

Ok. Your minor_doc_fixes branch and this plot_directive branch have been merged into minor_doc_fixes.

mdboom closed this Apr 4, 2011
richbwood mentioned this pull request Dec 19, 2012
fariza added a commit to fariza/matplotlib that referenced this pull request Sep 22, 2016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL