Skip to content

MEP 12: Gallery cleanup and reorganization (rebase) #1924

Merged
merged 36 commits into from Apr 26, 2013

4 participants

@tonysyu
tonysyu commented Apr 19, 2013

Rebase of #1623. I rebased on a separate branch just in case I mess up. The gallery looks good on my end, but I don't have the green button so I can't check whether or not github gives the "We can’t automatically merge this pull request." message.

tonysyu added some commits Dec 17, 2012
@tonysyu tonysyu STY: Refactor string formatting/templating 5c4ce96
@tonysyu tonysyu Clean-up and move scatter_demo 38fd903
@tonysyu tonysyu Cleanup and move fill_demo 6c5c108
@tonysyu tonysyu Cleanup and move pie_demo 7926105
@tonysyu tonysyu Cleanup and move errorbar_demo.
Split demo in to two different examples
f5d3381
@tonysyu tonysyu Cleanup and move fill_demo2
Rename fill_demo2 to fill_demo_features to clarify purpose
848f06d
@tonysyu tonysyu Cleanup and move histogram_demo 5c7b6c4
@tonysyu tonysyu Cleanup and move hinton_demo 54eaa89
@tonysyu tonysyu Cleanup and move image_demo3.py
* Rename to imshow_demo
* Add smaller version of lena image saved as a numpy binary so that use doesn't require PIL
281081b
@tonysyu tonysyu DOC: Minor rewording 8cedd21
@tonysyu tonysyu Fix doc build to search in new example sections.
Add new sphinx config variable `mpl_example_sections` and use this list in both `gen_gallery.py` and `gen_rst.py`.
3c82361
@tonysyu tonysyu Cleanup and move subplot_demo c4dae6f
@tonysyu tonysyu Update example section titles 60c371f
@tonysyu tonysyu Cleanup and move unicode_demo 89071ad
@tonysyu tonysyu Consolidate histogram examples 89abce6
@tonysyu tonysyu Cleanup and move vertical_ticklabels demo a4ea5f7
@tonysyu tonysyu Cleanup and move clippath_demo 9b9cf83
@tonysyu tonysyu Rename imshow_demo to image_demo 299588e
@tonysyu tonysyu Cleanup and move polar_bar demo 653e532
@tonysyu tonysyu Cleanup and move polar scatter demo 016369d
@tonysyu tonysyu Cleanup and move text themes demo 38fbb21
@tonysyu tonysyu Cleanup and move path_patch demo 353ea06
@tonysyu tonysyu Clean up and move integral demo 71060da
@tonysyu tonysyu Extract spines_demo_bounds from spine_placement_demo af2a2c6
@tonysyu tonysyu Extract spines_demo from spine_placement_demo b6f2f2f
@tonysyu tonysyu Cleanup integral_demo b48c3db
@tonysyu tonysyu Cleanup and move dash_control demo ab080c7
@tonysyu tonysyu Clean up and move color_cycle demo 12cbf1a
@tonysyu tonysyu Tweak subplot layout to prevent label clipping 97afb7f
@tonysyu tonysyu Add colormap references based on show_colormaps 8ee7460
@tonysyu tonysyu Clean up and move artist demo 8ecd20d
@tonysyu tonysyu Clean up and move streamplot demos a97d058
@tonysyu tonysyu Combine colormap reference examples 17e3090
@tonysyu tonysyu Clean up and move barh_demo 0d4ca31
@tonysyu tonysyu STY: Combine declarations of example directories 804b94c
@tonysyu tonysyu Fix example link aa6b410
@mdboom
Matplotlib Developers member
mdboom commented Apr 19, 2013

Looks good to me. (And the green button is there!). I'm fine with merging this now, but would like @pelson's view about whether it will be easiest to do this before or after #1918.

@tonysyu
tonysyu commented Apr 19, 2013

If it's easier to merge #1918 first, I don't mind redoing the rebase.

@pelson
Matplotlib Developers member
pelson commented Apr 25, 2013

I've just checked out a fresh clone of this and was unable to build the docs:

reading sources... [  0%] api/axes_api                                                                                                                
Exception occurred:
  File "<path to global matplotlib install>/matplotlib/sphinxext/plot_directive.py", line 670, in run
    with open(source_file_name, 'r') as fd:
IOError: [Errno 2] No such file or directory: u'<path to local matplotlib install>/doc/mpl_examples/pylab_examples/errorbar_demo.py'
The full traceback has been saved in /var/tmp/sphinx-err-o5We0U.log, if you want to report the issue to the developers.

Any ideas? @NelleV have you ever seen this?

@pelson
Matplotlib Developers member
pelson commented Apr 25, 2013

Any ideas? @NelleV have you ever seen this?

Looks like my paths are a little odd. I think I know the problem, now time to find a solution 😄...

@NelleV
NelleV commented Apr 25, 2013

@pelson If seen this before: I think doing a make clean solves the problem. You also need to make sure you've got the proper version of matplotlib installed (ie you need to check you are building the documentation at time T of the matplotlib version at time T, and not at time T - n) .

@pelson
Matplotlib Developers member
pelson commented Apr 26, 2013

I think doing a make clean solves the problem

Hmmm, yes, normally I'd agree, but because the clean wasn't working I took a whole new clone of this branch and it still failed. It turns out that because of the way make.py calls sphinx-build, which itself calls python, my local build of matplotlib is not being picked up, and instead I'm getting the old globally installed version (in fact, this had nothing to do with our make.py, I get the same problem calling sphinx-build directly. Adding sys.path.insert(0, '../lib/') to conf.py did the trick though.

Now building these docs. Once I've done that, I'll merge this and then rebase my conflicting branch.

@pelson
Matplotlib Developers member
pelson commented Apr 26, 2013

For the record, I've also been getting the following:

writing output... [  0%] api/artist_api                                                                                                               
Exception occurred:
  File "Sphinx-1.1.3-py2.7.egg/sphinx/ext/graphviz.py", line 219, in render_dot_html
    mapfile = open(outfn + '.map', 'rb')
IOError: [Errno 2] No such file or directory: 'doc/build/html/_images/inheritance-e7d27e10673ff7b93cbe7104e04dbb29a26587da.png.map'
The full traceback has been saved in /var/tmp/sphinx-err-JmhgQ8.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
Either send bugs to the mailing list at <http://groups.google.com/group/sphinx-dev/>,
or report them in the tracker at <http://bitbucket.org/birkenfeld/sphinx/issues/>. Thanks!
Building HTML failed.

Which I fixed by downgrading from graphiviz 2.30 back to 2.26 (because I had it handy, but otherwise 2.28).

@pelson
Matplotlib Developers member
pelson commented Apr 26, 2013

I notice Lena has made her way back into the gallery. @tonysyu - would you mind creating a follow on PR to use the Grace Hopper image instead?

@pelson pelson merged commit 218b550 into matplotlib:master Apr 26, 2013

1 check passed

Details default The Travis build passed
@pelson
Matplotlib Developers member
pelson commented Apr 26, 2013

@tonysyu - would mind also putting up another separate PR which fixes backend_driver.py?

@mdboom
Matplotlib Developers member
mdboom commented Apr 26, 2013

@pelson: My solution to the build-sphinx script pointing to the wrong Python is to install Sphinx into the same virtualenv as where I installed matplotlib. Adding ../lib to sys.path will only work for pure Python modules -- C/C++ extentsions don't live there so won't be included.

@takluyver takluyver referenced this pull request Apr 27, 2013
Merged

New doc build failure #1953

@tonysyu tonysyu added a commit to tonysyu/matplotlib that referenced this pull request May 5, 2013
@tonysyu tonysyu Replace usage of Lena image in the gallery.
Note that lena.npy was created in PR #1924 before I realized matplotlib could read png images without PIL. That file wasn't used anywhere else, so I remove it here.
25aba29
@tonysyu tonysyu added a commit to tonysyu/matplotlib that referenced this pull request May 5, 2013
@tonysyu tonysyu Fix `backend_driver.py`
A couple of files were removed in PR #1918, but were accidentally re-added to `backend_driver.py` by PR #1924.
42f3f00
@tonysyu tonysyu referenced this pull request May 5, 2013
Merged

Fix `backend_driver.py` #1977

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.