GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Plot directive by mdboom · Pull Request #66 · matplotlib/matplotlib

Conversation

@mdboom

@mdboom 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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mdboom added 9 commits March 28, 2011 15:02
@mdboom
First pass at reconciling Numpy's version of plot_directive with ours.
a205f54
@mdboom
Update some relative paths to follow the new self-consistent approach…
94b32c4
… taken by Numpy's version of plot_directive. relative paths are now relative to the document.
@mdboom
Add support for custom rcParams -- required to build Numpy docs.
df50940
@mdboom
Bugfix to support Numpy's "doctest" style input to the plot_directive.
917b3d2
@mdboom
The default DPI for PDF is now 200 (it was 50, which is an odd choice)
19b0be3
@mdboom
Add a version to the plot_directive so other tools (such as Numpy) ca…
3fb0f99
…n check against it.
@mdboom
Add a changelog entry for the plot_directive changes
8521225
@mdboom
Improve plot_directive's docstring and use it from the main docs.
6bae189
@mdboom
Improve plot_directive's docstring and use it from the main docs.
f13c3df
ddale
ddale reviewed Apr 2, 2011
View reviewed changes
Comment thread CHANGELOG Outdated

@ddale ddale Apr 2, 2011

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mdboom mdboom Apr 4, 2011

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Sure. Fixed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ddale

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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mdboom

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ddale

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mdboom added 2 commits April 4, 2011 08:00
@mdboom
Merge branch 'plot_directive' of github.com:mdboom/matplotlib into pl…
403c5b8
…ot_directive

Conflicts:
	lib/matplotlib/sphinxext/plot_directive.py
@mdboom
Remove incorrect item from CHANGELOG
eecadbb
@mdboom

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mdboom mdboom closed this Apr 4, 2011
@richbwood richbwood mentioned this pull request Dec 19, 2012
test_pcolormesh hangs #1609
Closed
fariza added a commit to fariza/matplotlib that referenced this pull request Sep 22, 2016
@fariza
Merge pull request matplotlib#66 from fariza/local-sphinx-ext
c665479
moving directives to a relative path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mdboom @ddale
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.