From b91801667293ef4a5985711aa3432624c857dd35 Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Wed, 8 Mar 2017 15:56:12 -0800 Subject: [PATCH 01/27] DOC starting the migration to sphinx - Added sphinx-gallery to doc/conf.y - Renamed all conflicting README.txt to README in our example folders --- doc/conf.py | 13 +++++++++++-- examples/api/{README.txt => README} | 0 examples/event_handling/{README.txt => README} | 0 examples/user_interfaces/{README.txt => README} | 0 examples/widgets/{README.txt => README} | 0 5 files changed, 11 insertions(+), 2 deletions(-) rename examples/api/{README.txt => README} (100%) rename examples/event_handling/{README.txt => README} (100%) rename examples/user_interfaces/{README.txt => README} (100%) rename examples/widgets/{README.txt => README} (100%) diff --git a/doc/conf.py b/doc/conf.py index 989f1f946a5d..c88b053b4e50 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -29,9 +29,10 @@ extensions = ['matplotlib.sphinxext.mathmpl', 'sphinxext.math_symbol_table', 'sphinx.ext.autodoc', 'matplotlib.sphinxext.only_directives', 'sphinx.ext.doctest', 'sphinx.ext.autosummary', - 'matplotlib.sphinxext.plot_directive', 'sphinx.ext.inheritance_diagram', - 'sphinxext.gen_gallery', 'sphinxext.gen_rst', + 'sphinx_gallery.gen_gallery', + 'sphinxext.gen_rst', + 'matplotlib.sphinxext.plot_directive', 'sphinxext.github', 'numpydoc'] @@ -96,6 +97,14 @@ autodoc_docstring_signature = True + +# Sphinx gallery configuration +sphinx_gallery_conf = { + # path to your examples scripts + 'examples_dirs' : '../examples', + # path where to save gallery generated examples + 'gallery_dirs' : 'auto_examples'} + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/examples/api/README.txt b/examples/api/README similarity index 100% rename from examples/api/README.txt rename to examples/api/README diff --git a/examples/event_handling/README.txt b/examples/event_handling/README similarity index 100% rename from examples/event_handling/README.txt rename to examples/event_handling/README diff --git a/examples/user_interfaces/README.txt b/examples/user_interfaces/README similarity index 100% rename from examples/user_interfaces/README.txt rename to examples/user_interfaces/README diff --git a/examples/widgets/README.txt b/examples/widgets/README similarity index 100% rename from examples/widgets/README.txt rename to examples/widgets/README From b110b1f715e0930e18c1e7d84ff5a03f8f4b97dc Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Wed, 8 Mar 2017 17:59:45 -0800 Subject: [PATCH 02/27] DOC Set up sphinx-gallery in parallel of our own gallery --- doc/conf.py | 2 ++ doc/users/image_tutorial.rst | 2 +- doc/users/prev_whats_new/whats_new_1.1.rst | 2 +- doc/users/prev_whats_new/whats_new_1.5.rst | 2 +- examples/color/README.txt | 4 ++++ examples/color/{color_cycle_demo.py => plot_color_cycle.py} | 0 .../{color_cycle_default.py => plot_color_cycle_default.py} | 0 .../{colormaps_reference.py => plot_colormaps_reference.py} | 0 examples/lines_bars_and_markers/README.txt | 4 ++++ examples/lines_bars_and_markers/scatter_with_legend.py | 4 +++- examples/pie_and_polar_charts/README.txt | 4 ++++ 11 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 examples/color/README.txt rename examples/color/{color_cycle_demo.py => plot_color_cycle.py} (100%) rename examples/color/{color_cycle_default.py => plot_color_cycle_default.py} (100%) rename examples/color/{colormaps_reference.py => plot_colormaps_reference.py} (100%) create mode 100644 examples/lines_bars_and_markers/README.txt create mode 100644 examples/pie_and_polar_charts/README.txt diff --git a/doc/conf.py b/doc/conf.py index c88b053b4e50..bbf177af124e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -32,6 +32,7 @@ 'sphinx.ext.inheritance_diagram', 'sphinx_gallery.gen_gallery', 'sphinxext.gen_rst', + 'sphinxext.gen_gallery', 'matplotlib.sphinxext.plot_directive', 'sphinxext.github', 'numpydoc'] @@ -105,6 +106,7 @@ # path where to save gallery generated examples 'gallery_dirs' : 'auto_examples'} +plot_gallery = True # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/doc/users/image_tutorial.rst b/doc/users/image_tutorial.rst index 1d1f58ee5e82..6fbc4194ce39 100644 --- a/doc/users/image_tutorial.rst +++ b/doc/users/image_tutorial.rst @@ -226,7 +226,7 @@ Note that you can also change colormaps on existing plot objects using the There are many other colormap schemes available. See the `list and images of the colormaps -<../examples/color/colormaps_reference.html>`_. +<../examples/color/plot_colormaps_reference.html>`_. .. _`Color Bars`: diff --git a/doc/users/prev_whats_new/whats_new_1.1.rst b/doc/users/prev_whats_new/whats_new_1.1.rst index 54cd72d80063..d7fda134a626 100644 --- a/doc/users/prev_whats_new/whats_new_1.1.rst +++ b/doc/users/prev_whats_new/whats_new_1.1.rst @@ -205,6 +205,6 @@ Other improvements * Pim Schellart added a new colormap called "cubehelix". Sameer Grover also added a colormap called "coolwarm". See it and all - other colormaps :ref:`here `. + other colormaps :ref:`here `. * Many bug fixes and documentation improvements. diff --git a/doc/users/prev_whats_new/whats_new_1.5.rst b/doc/users/prev_whats_new/whats_new_1.5.rst index a8edf5c3b2db..4085726d8d9e 100644 --- a/doc/users/prev_whats_new/whats_new_1.5.rst +++ b/doc/users/prev_whats_new/whats_new_1.5.rst @@ -109,7 +109,7 @@ You can even multiply cyclers, which is like using `itertools.product()` on two or more property cycles. Remember to use parentheses if writing a multi-line `prop_cycle` parameter. -.. plot:: mpl_examples/color/color_cycle_demo.py +.. plot:: mpl_examples/color/plot_color_cycle.py New Colormaps diff --git a/examples/color/README.txt b/examples/color/README.txt new file mode 100644 index 000000000000..7bd143064172 --- /dev/null +++ b/examples/color/README.txt @@ -0,0 +1,4 @@ +.. _color_examples: + +Color +===== diff --git a/examples/color/color_cycle_demo.py b/examples/color/plot_color_cycle.py similarity index 100% rename from examples/color/color_cycle_demo.py rename to examples/color/plot_color_cycle.py diff --git a/examples/color/color_cycle_default.py b/examples/color/plot_color_cycle_default.py similarity index 100% rename from examples/color/color_cycle_default.py rename to examples/color/plot_color_cycle_default.py diff --git a/examples/color/colormaps_reference.py b/examples/color/plot_colormaps_reference.py similarity index 100% rename from examples/color/colormaps_reference.py rename to examples/color/plot_colormaps_reference.py diff --git a/examples/lines_bars_and_markers/README.txt b/examples/lines_bars_and_markers/README.txt new file mode 100644 index 000000000000..a842344008fa --- /dev/null +++ b/examples/lines_bars_and_markers/README.txt @@ -0,0 +1,4 @@ +.. _lines_bars_and_markers_example: + +Lines, bars and markers +======================= diff --git a/examples/lines_bars_and_markers/scatter_with_legend.py b/examples/lines_bars_and_markers/scatter_with_legend.py index 8f86bc51f8ed..bca9215ef8aa 100644 --- a/examples/lines_bars_and_markers/scatter_with_legend.py +++ b/examples/lines_bars_and_markers/scatter_with_legend.py @@ -1,5 +1,7 @@ ''' -Demo of a scatter plot (scatter) with a legend. +=========================== +Scatter plots with a legend +=========================== Also demonstrates how transparency of the markers can be adjusted by giving ``alpha`` a value between diff --git a/examples/pie_and_polar_charts/README.txt b/examples/pie_and_polar_charts/README.txt new file mode 100644 index 000000000000..31f87c586495 --- /dev/null +++ b/examples/pie_and_polar_charts/README.txt @@ -0,0 +1,4 @@ +.. _pie_and_polar_charts: + +Pie and polar charts +==================== From ba6d2680b49ef40ca092093e7833ed22ef609481 Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Fri, 10 Mar 2017 21:19:54 -0800 Subject: [PATCH 03/27] DOC added sphinx-gallery as a requirement --- doc-requirements.txt | 1 + doc/README.txt | 3 ++- doc/conf.py | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc-requirements.txt b/doc-requirements.txt index 5d3f8759a0a7..9af746509bae 100644 --- a/doc-requirements.txt +++ b/doc-requirements.txt @@ -12,3 +12,4 @@ ipython mock colorspacious pillow +sphinx-gallery diff --git a/doc/README.txt b/doc/README.txt index d88e0b226712..925a91e67f29 100644 --- a/doc/README.txt +++ b/doc/README.txt @@ -21,7 +21,8 @@ All of these dependencies *except graphviz* can be installed through pip:: or all of them via conda and pip:: - conda install sphinx numpydoc ipython mock graphviz pillow + conda install sphinx numpydoc ipython mock graphviz pillow \ + sphinx-gallery pip install colorspacious To build the HTML documentation, type ``python make.py html`` in this diff --git a/doc/conf.py b/doc/conf.py index bbf177af124e..23dda7f9ef3e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -55,6 +55,12 @@ raise ImportError("No module named numpydoc - you need to install " "numpydoc to build the documentation.") +try: + import sphinx_gallery +except ImportError: + raise ImportError("No module named sphinx-gallery - you need to install " + "numpydoc to build the documentation.") + try: import colorspacious except ImportError: From c908f984d9493ed65fccd63c6382d34df07c6511 Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Fri, 10 Mar 2017 21:24:09 -0800 Subject: [PATCH 04/27] DOC Added readme files to include examples in SG --- .gitignore | 1 + examples/showcase/README.txt | 4 ++++ examples/style_sheets/README.txt | 4 ++++ examples/text_labels_and_annotations/README.txt | 4 ++++ examples/text_labels_and_annotations/rainbow_text.py | 4 ++++ 5 files changed, 17 insertions(+) create mode 100644 examples/showcase/README.txt create mode 100644 examples/style_sheets/README.txt create mode 100644 examples/text_labels_and_annotations/README.txt diff --git a/.gitignore b/.gitignore index 0c5a23276532..665e53c49fe1 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ build # sphinx build directory doc/_build +doc/auto_examples # setup.py dist directory dist # Egg metadata diff --git a/examples/showcase/README.txt b/examples/showcase/README.txt new file mode 100644 index 000000000000..28028ad666a2 --- /dev/null +++ b/examples/showcase/README.txt @@ -0,0 +1,4 @@ +.. _showcase_examples: + +Showcase +======== diff --git a/examples/style_sheets/README.txt b/examples/style_sheets/README.txt new file mode 100644 index 000000000000..671ff3bf3067 --- /dev/null +++ b/examples/style_sheets/README.txt @@ -0,0 +1,4 @@ +.. _style_sheet_examples: + +Style sheets +============ diff --git a/examples/text_labels_and_annotations/README.txt b/examples/text_labels_and_annotations/README.txt new file mode 100644 index 000000000000..565fd8915c86 --- /dev/null +++ b/examples/text_labels_and_annotations/README.txt @@ -0,0 +1,4 @@ +.. _text_labels_and_annotations: + +Text, labels and annotations +============================ diff --git a/examples/text_labels_and_annotations/rainbow_text.py b/examples/text_labels_and_annotations/rainbow_text.py index 95142175ce3d..3a930b4a7c40 100644 --- a/examples/text_labels_and_annotations/rainbow_text.py +++ b/examples/text_labels_and_annotations/rainbow_text.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- """ +============ +Rainbow text +============ + The example shows how to string together several text objects. HISTORY From c61c856f2f37292d5f37c4db7ef0f02c5fbd5c1d Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Fri, 10 Mar 2017 21:26:30 -0800 Subject: [PATCH 05/27] DOC SG doesn't support parallel builds yet --- .travis.yml | 1 + ci/travis/test_script.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index eac4d4f82e32..2bd4d5ba9ebb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -142,6 +142,7 @@ install: pip install -ve . script: source ci/travis/test_script.sh + before_cache: - rm -rf $HOME/.cache/matplotlib/tex.cache - rm -rf $HOME/.cache/matplotlib/test_cache diff --git a/ci/travis/test_script.sh b/ci/travis/test_script.sh index 21ee11fee066..a978fde101f4 100644 --- a/ci/travis/test_script.sh +++ b/ci/travis/test_script.sh @@ -30,7 +30,7 @@ if [[ $BUILD_DOCS == false ]]; then fi else cd doc - python make.py html -n 2 + python make.py html # We don't build the LaTeX docs here, so linkchecker will complain touch build/html/Matplotlib.pdf # Linkchecker only works with python 2.7 for the time being From eaaf1829e8e23bab8dbac03b14f59412f5886974 Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Fri, 10 Mar 2017 21:46:53 -0800 Subject: [PATCH 06/27] DOC lines, bars and markers is now full SG --- doc/users/legend_guide.rst | 2 +- doc/users/screenshots.rst | 4 ++-- doc/users/whats_new.rst | 2 +- .../{barh_demo.py => plot_barh.py} | 0 .../{cohere_demo.py => plot_cohere.py} | 0 .../{fill_demo.py => plot_fill.py} | 0 ...ash_control.py => plot_line_demo_dash_control.py} | 0 ...es_reference.py => plot_line_styles_reference.py} | 0 .../{linestyles.py => plot_linestyles.py} | 0 ...ference.py => plot_marker_fillstyle_reference.py} | 0 ...{marker_reference.py => plot_marker_reference.py} | 0 ...ulticolored_line.py => plot_multicolored_line.py} | 0 ...er_with_legend.py => plot_scatter_with_legend.py} | 0 examples/tests/backend_driver.py | 12 ++++++------ lib/matplotlib/axes/_axes.py | 4 ++-- 15 files changed, 12 insertions(+), 12 deletions(-) rename examples/lines_bars_and_markers/{barh_demo.py => plot_barh.py} (100%) rename examples/lines_bars_and_markers/{cohere_demo.py => plot_cohere.py} (100%) rename examples/lines_bars_and_markers/{fill_demo.py => plot_fill.py} (100%) rename examples/lines_bars_and_markers/{line_demo_dash_control.py => plot_line_demo_dash_control.py} (100%) rename examples/lines_bars_and_markers/{line_styles_reference.py => plot_line_styles_reference.py} (100%) rename examples/lines_bars_and_markers/{linestyles.py => plot_linestyles.py} (100%) rename examples/lines_bars_and_markers/{marker_fillstyle_reference.py => plot_marker_fillstyle_reference.py} (100%) rename examples/lines_bars_and_markers/{marker_reference.py => plot_marker_reference.py} (100%) rename examples/lines_bars_and_markers/{multicolored_line.py => plot_multicolored_line.py} (100%) rename examples/lines_bars_and_markers/{scatter_with_legend.py => plot_scatter_with_legend.py} (100%) diff --git a/doc/users/legend_guide.rst b/doc/users/legend_guide.rst index c7fb0621df9f..59686ce70c35 100644 --- a/doc/users/legend_guide.rst +++ b/doc/users/legend_guide.rst @@ -289,8 +289,8 @@ Known examples of using legend Here is a non-exhaustive list of the examples available involving legend being used in various ways: -* :ref:`lines_bars_and_markers-scatter_with_legend` * :ref:`api-plot_legend` +* :ref:`lines_bars_and_markers-plot_scatter_with_legend` * :ref:`pylab_examples-contourf_hatching` * :ref:`pylab_examples-figlegend_demo` * :ref:`pylab_examples-scatter_symbol` diff --git a/doc/users/screenshots.rst b/doc/users/screenshots.rst index d5ab16bb7870..779514b586a0 100644 --- a/doc/users/screenshots.rst +++ b/doc/users/screenshots.rst @@ -103,7 +103,7 @@ command, which includes customizations such as error bars: It's also simple to create stacked bars (`bar_stacked.py <../examples/pylab_examples/bar_stacked.html>`_), or horizontal bar charts -(`barh_demo.py <../examples/lines_bars_and_markers/barh_demo.html>`_). +(`plot_barh.py <../examples/lines_bars_and_markers/plot_barh.html>`_). .. _screenshots_pie_demo: @@ -166,7 +166,7 @@ Fill demo The :func:`~matplotlib.pyplot.fill` command lets you plot filled curves and polygons: -.. plot:: mpl_examples/lines_bars_and_markers/fill_demo.py +.. plot:: mpl_examples/lines_bars_and_markers/plot_fill.py Thanks to Andrew Straw for adding this function. diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 078eef4e4912..6923a00af092 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -287,7 +287,7 @@ Filled ``+`` and ``x`` markers New fillable *plus* and *x* markers have been added. See the :mod:`~matplotlib.markers` module and -:ref:`marker reference ` +:ref:`marker reference ` examples. `rcount` and `ccount` for `plot_surface()` diff --git a/examples/lines_bars_and_markers/barh_demo.py b/examples/lines_bars_and_markers/plot_barh.py similarity index 100% rename from examples/lines_bars_and_markers/barh_demo.py rename to examples/lines_bars_and_markers/plot_barh.py diff --git a/examples/lines_bars_and_markers/cohere_demo.py b/examples/lines_bars_and_markers/plot_cohere.py similarity index 100% rename from examples/lines_bars_and_markers/cohere_demo.py rename to examples/lines_bars_and_markers/plot_cohere.py diff --git a/examples/lines_bars_and_markers/fill_demo.py b/examples/lines_bars_and_markers/plot_fill.py similarity index 100% rename from examples/lines_bars_and_markers/fill_demo.py rename to examples/lines_bars_and_markers/plot_fill.py diff --git a/examples/lines_bars_and_markers/line_demo_dash_control.py b/examples/lines_bars_and_markers/plot_line_demo_dash_control.py similarity index 100% rename from examples/lines_bars_and_markers/line_demo_dash_control.py rename to examples/lines_bars_and_markers/plot_line_demo_dash_control.py diff --git a/examples/lines_bars_and_markers/line_styles_reference.py b/examples/lines_bars_and_markers/plot_line_styles_reference.py similarity index 100% rename from examples/lines_bars_and_markers/line_styles_reference.py rename to examples/lines_bars_and_markers/plot_line_styles_reference.py diff --git a/examples/lines_bars_and_markers/linestyles.py b/examples/lines_bars_and_markers/plot_linestyles.py similarity index 100% rename from examples/lines_bars_and_markers/linestyles.py rename to examples/lines_bars_and_markers/plot_linestyles.py diff --git a/examples/lines_bars_and_markers/marker_fillstyle_reference.py b/examples/lines_bars_and_markers/plot_marker_fillstyle_reference.py similarity index 100% rename from examples/lines_bars_and_markers/marker_fillstyle_reference.py rename to examples/lines_bars_and_markers/plot_marker_fillstyle_reference.py diff --git a/examples/lines_bars_and_markers/marker_reference.py b/examples/lines_bars_and_markers/plot_marker_reference.py similarity index 100% rename from examples/lines_bars_and_markers/marker_reference.py rename to examples/lines_bars_and_markers/plot_marker_reference.py diff --git a/examples/lines_bars_and_markers/multicolored_line.py b/examples/lines_bars_and_markers/plot_multicolored_line.py similarity index 100% rename from examples/lines_bars_and_markers/multicolored_line.py rename to examples/lines_bars_and_markers/plot_multicolored_line.py diff --git a/examples/lines_bars_and_markers/scatter_with_legend.py b/examples/lines_bars_and_markers/plot_scatter_with_legend.py similarity index 100% rename from examples/lines_bars_and_markers/scatter_with_legend.py rename to examples/lines_bars_and_markers/plot_scatter_with_legend.py diff --git a/examples/tests/backend_driver.py b/examples/tests/backend_driver.py index e084e032f9d8..9197800d0665 100644 --- a/examples/tests/backend_driver.py +++ b/examples/tests/backend_driver.py @@ -51,13 +51,13 @@ files = dict() files['lines'] = [ - 'barh_demo.py', - 'cohere_demo.py', - 'fill_demo.py', + 'plot_barh.py', + 'plot_cohere.py', + 'plot_fill.py', 'fill_demo_features.py', - 'line_demo_dash_control.py', - 'line_styles_reference.py', - 'scatter_with_legend.py' + 'plot_line_demo_dash_control.py', + 'plot_line_styles_reference.py', + 'plot_scatter_with_legend.py' ] files['shapes'] = [ diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 8c6c400a2d81..1fac6c9d48ff 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -4699,7 +4699,7 @@ def fill(self, *args, **kwargs): Examples -------- - .. plot:: mpl_examples/lines_bars_and_markers/fill_demo.py + .. plot:: auto_examples/lines_bars_and_markers/plot_fill.py """ @@ -7067,7 +7067,7 @@ def cohere(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, Examples -------- - .. plot:: mpl_examples/lines_bars_and_markers/cohere_demo.py + .. plot:: auto_examples/lines_bars_and_markers/plot_cohere.py """ if not self._hold: self.cla() From 4f92501d5e5f203e258965ca6e0e8f723a677bd2 Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Fri, 10 Mar 2017 22:30:45 -0800 Subject: [PATCH 07/27] DOC examples/statistics is fully SG --- doc/users/prev_whats_new/whats_new_1.4.rst | 4 +- doc/users/screenshots.rst | 2 +- examples/README | 44 ++++++++++++++++++ examples/README.txt | 46 ++----------------- examples/statistics/README.txt | 4 ++ .../{boxplot_demo.py => plot_boxplot.py} | 0 ...ot_color_demo.py => plot_boxplot_color.py} | 0 ...olin_demo.py => plot_boxplot_vs_violin.py} | 0 .../statistics/{bxp_demo.py => plot_bxp.py} | 0 ...olin_demo.py => plot_customized_violin.py} | 0 .../{errorbar_demo.py => plot_errorbar.py} | 0 ..._features.py => plot_errorbar_features.py} | 0 ...rbar_limits.py => plot_errorbar_limits.py} | 0 ...d_boxes.py => plot_errorbars_and_boxes.py} | 0 ...lative.py => plot_histogram_cumulative.py} | 0 ...features.py => plot_histogram_features.py} | 0 ...sttypes.py => plot_histogram_histtypes.py} | 0 ...ltihist.py => plot_histogram_multihist.py} | 0 ... plot_multiple_histograms_side_by_side.py} | 0 ...{violinplot_demo.py => plot_violinplot.py} | 0 examples/tests/backend_driver.py | 12 ++--- lib/matplotlib/axes/_axes.py | 11 +++-- 22 files changed, 68 insertions(+), 55 deletions(-) create mode 100644 examples/README create mode 100644 examples/statistics/README.txt rename examples/statistics/{boxplot_demo.py => plot_boxplot.py} (100%) rename examples/statistics/{boxplot_color_demo.py => plot_boxplot_color.py} (100%) rename examples/statistics/{boxplot_vs_violin_demo.py => plot_boxplot_vs_violin.py} (100%) rename examples/statistics/{bxp_demo.py => plot_bxp.py} (100%) rename examples/statistics/{customized_violin_demo.py => plot_customized_violin.py} (100%) rename examples/statistics/{errorbar_demo.py => plot_errorbar.py} (100%) rename examples/statistics/{errorbar_demo_features.py => plot_errorbar_features.py} (100%) rename examples/statistics/{errorbar_limits.py => plot_errorbar_limits.py} (100%) rename examples/statistics/{errorbars_and_boxes.py => plot_errorbars_and_boxes.py} (100%) rename examples/statistics/{histogram_demo_cumulative.py => plot_histogram_cumulative.py} (100%) rename examples/statistics/{histogram_demo_features.py => plot_histogram_features.py} (100%) rename examples/statistics/{histogram_demo_histtypes.py => plot_histogram_histtypes.py} (100%) rename examples/statistics/{histogram_demo_multihist.py => plot_histogram_multihist.py} (100%) rename examples/statistics/{multiple_histograms_side_by_side.py => plot_multiple_histograms_side_by_side.py} (100%) rename examples/statistics/{violinplot_demo.py => plot_violinplot.py} (100%) diff --git a/doc/users/prev_whats_new/whats_new_1.4.rst b/doc/users/prev_whats_new/whats_new_1.4.rst index 51b377f0ee05..b361b605a19c 100644 --- a/doc/users/prev_whats_new/whats_new_1.4.rst +++ b/doc/users/prev_whats_new/whats_new_1.4.rst @@ -82,8 +82,8 @@ with :func:`~matplotlib.Axes.bxp`. Lastly, each artist (e.g., the box, outliers, cap, notches) can now be toggled on or off and their styles can be passed in through individual kwargs. See the examples: -:ref:`statistics-boxplot_demo` and -:ref:`statistics-bxp_demo` +:ref:`statistics-plot_boxplot` and +:ref:`statistics-plot_bxp` Added a bool kwarg, :code:`manage_xticks`, which if False disables the management of the ticks and limits on the x-axis by :func:`~matplotlib.axes.Axes.bxp`. diff --git a/doc/users/screenshots.rst b/doc/users/screenshots.rst index 779514b586a0..1692aad7e024 100644 --- a/doc/users/screenshots.rst +++ b/doc/users/screenshots.rst @@ -32,7 +32,7 @@ Histograms The :func:`~matplotlib.pyplot.hist` command automatically generates histograms and returns the bin counts or probabilities: -.. plot:: mpl_examples/statistics/histogram_demo_features.py +.. plot:: auto_examples/statistics/plot_histogram_features.py .. _screenshots_path_demo: diff --git a/examples/README b/examples/README new file mode 100644 index 000000000000..1e89277d289b --- /dev/null +++ b/examples/README @@ -0,0 +1,44 @@ +Matplotlib examples +=================== + +There are a variety of ways to use Matplotlib, and most of them are +illustrated in the examples in this directory. + +Probably the most common way people use Matplotlib is with the +procedural interface, which follows the MATLAB/IDL/Mathematica approach +of using simple procedures like "plot" or "title" to modify the current +figure. These examples are included in the "pylab_examples" directory. +If you want to write more robust scripts, e.g., for production use or in +a web application server, you will probably want to use the Matplotlib +API for full control. These examples are found in the "api" directory. +Below is a brief description of the different directories found here: + + * animation - Dynamic plots, see the documentation at + http://matplotlib.org/api/animation_api.html + + * api - working with the Matplotlib API directly. + + * axes_grid1 - Examples related to the axes_grid1 toolkit. + + * axisartist - Examples related to the axisartist toolkit. + + * event_handling - How to interact with your figure, mouse presses, + key presses, object picking, etc. + + * misc - Miscellaneous examples. Some demos for loading and working + with record arrays. + + * mplot3d - 3D examples. + + * pylab_examples - The interface to Matplotlib similar to MATLAB. + + * tests - Tests used by Matplotlib developers to check functionality. + (These tests are still sometimes useful, but mostly developers should + use the pytest tests which perform automatic image comparison.) + + * units - Working with unit data and custom types in Matplotlib. + + * user_interfaces - Using Matplotlib in a GUI application, e.g., + Tkinter, wxPython, PyGObject, PyQt widgets. + + * widgets - Examples using interactive widgets. diff --git a/examples/README.txt b/examples/README.txt index 1e89277d289b..10d55859a56d 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -1,44 +1,8 @@ -Matplotlib examples -=================== +.. _gallery: -There are a variety of ways to use Matplotlib, and most of them are -illustrated in the examples in this directory. +Gallery +======= -Probably the most common way people use Matplotlib is with the -procedural interface, which follows the MATLAB/IDL/Mathematica approach -of using simple procedures like "plot" or "title" to modify the current -figure. These examples are included in the "pylab_examples" directory. -If you want to write more robust scripts, e.g., for production use or in -a web application server, you will probably want to use the Matplotlib -API for full control. These examples are found in the "api" directory. -Below is a brief description of the different directories found here: +Click on any image to see full size image and source code. - * animation - Dynamic plots, see the documentation at - http://matplotlib.org/api/animation_api.html - - * api - working with the Matplotlib API directly. - - * axes_grid1 - Examples related to the axes_grid1 toolkit. - - * axisartist - Examples related to the axisartist toolkit. - - * event_handling - How to interact with your figure, mouse presses, - key presses, object picking, etc. - - * misc - Miscellaneous examples. Some demos for loading and working - with record arrays. - - * mplot3d - 3D examples. - - * pylab_examples - The interface to Matplotlib similar to MATLAB. - - * tests - Tests used by Matplotlib developers to check functionality. - (These tests are still sometimes useful, but mostly developers should - use the pytest tests which perform automatic image comparison.) - - * units - Working with unit data and custom types in Matplotlib. - - * user_interfaces - Using Matplotlib in a GUI application, e.g., - Tkinter, wxPython, PyGObject, PyQt widgets. - - * widgets - Examples using interactive widgets. +.. contents:: diff --git a/examples/statistics/README.txt b/examples/statistics/README.txt new file mode 100644 index 000000000000..5949a1920c02 --- /dev/null +++ b/examples/statistics/README.txt @@ -0,0 +1,4 @@ +.. _statistics_examples: + +Statistics +========== diff --git a/examples/statistics/boxplot_demo.py b/examples/statistics/plot_boxplot.py similarity index 100% rename from examples/statistics/boxplot_demo.py rename to examples/statistics/plot_boxplot.py diff --git a/examples/statistics/boxplot_color_demo.py b/examples/statistics/plot_boxplot_color.py similarity index 100% rename from examples/statistics/boxplot_color_demo.py rename to examples/statistics/plot_boxplot_color.py diff --git a/examples/statistics/boxplot_vs_violin_demo.py b/examples/statistics/plot_boxplot_vs_violin.py similarity index 100% rename from examples/statistics/boxplot_vs_violin_demo.py rename to examples/statistics/plot_boxplot_vs_violin.py diff --git a/examples/statistics/bxp_demo.py b/examples/statistics/plot_bxp.py similarity index 100% rename from examples/statistics/bxp_demo.py rename to examples/statistics/plot_bxp.py diff --git a/examples/statistics/customized_violin_demo.py b/examples/statistics/plot_customized_violin.py similarity index 100% rename from examples/statistics/customized_violin_demo.py rename to examples/statistics/plot_customized_violin.py diff --git a/examples/statistics/errorbar_demo.py b/examples/statistics/plot_errorbar.py similarity index 100% rename from examples/statistics/errorbar_demo.py rename to examples/statistics/plot_errorbar.py diff --git a/examples/statistics/errorbar_demo_features.py b/examples/statistics/plot_errorbar_features.py similarity index 100% rename from examples/statistics/errorbar_demo_features.py rename to examples/statistics/plot_errorbar_features.py diff --git a/examples/statistics/errorbar_limits.py b/examples/statistics/plot_errorbar_limits.py similarity index 100% rename from examples/statistics/errorbar_limits.py rename to examples/statistics/plot_errorbar_limits.py diff --git a/examples/statistics/errorbars_and_boxes.py b/examples/statistics/plot_errorbars_and_boxes.py similarity index 100% rename from examples/statistics/errorbars_and_boxes.py rename to examples/statistics/plot_errorbars_and_boxes.py diff --git a/examples/statistics/histogram_demo_cumulative.py b/examples/statistics/plot_histogram_cumulative.py similarity index 100% rename from examples/statistics/histogram_demo_cumulative.py rename to examples/statistics/plot_histogram_cumulative.py diff --git a/examples/statistics/histogram_demo_features.py b/examples/statistics/plot_histogram_features.py similarity index 100% rename from examples/statistics/histogram_demo_features.py rename to examples/statistics/plot_histogram_features.py diff --git a/examples/statistics/histogram_demo_histtypes.py b/examples/statistics/plot_histogram_histtypes.py similarity index 100% rename from examples/statistics/histogram_demo_histtypes.py rename to examples/statistics/plot_histogram_histtypes.py diff --git a/examples/statistics/histogram_demo_multihist.py b/examples/statistics/plot_histogram_multihist.py similarity index 100% rename from examples/statistics/histogram_demo_multihist.py rename to examples/statistics/plot_histogram_multihist.py diff --git a/examples/statistics/multiple_histograms_side_by_side.py b/examples/statistics/plot_multiple_histograms_side_by_side.py similarity index 100% rename from examples/statistics/multiple_histograms_side_by_side.py rename to examples/statistics/plot_multiple_histograms_side_by_side.py diff --git a/examples/statistics/violinplot_demo.py b/examples/statistics/plot_violinplot.py similarity index 100% rename from examples/statistics/violinplot_demo.py rename to examples/statistics/plot_violinplot.py diff --git a/examples/tests/backend_driver.py b/examples/tests/backend_driver.py index 9197800d0665..8dcf2271677d 100644 --- a/examples/tests/backend_driver.py +++ b/examples/tests/backend_driver.py @@ -76,12 +76,12 @@ ] files['statistics'] = [ - 'errorbar_demo.py', - 'errorbar_demo_features.py', - 'histogram_demo_cumulative.py', - 'histogram_demo_features.py', - 'histogram_demo_histtypes.py', - 'histogram_demo_multihist.py', + 'plot_errorbar.py', + 'plot_errorbar_features.py', + 'plot_histogram_cumulative.py', + 'plot_histogram_features.py', + 'plot_histogram_histtypes.py', + 'plot_histogram_multihist.py', ] files['pie'] = [ diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 1fac6c9d48ff..00fdc1ca62e2 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -2799,7 +2799,8 @@ def errorbar(self, x, y, yerr=None, xerr=None, Examples -------- - .. plot:: mpl_examples/statistics/errorbar_demo.py + .. plot:: auto_examples/statistics/plot_errorbar.py + """ kwargs = cbook.normalize_kwargs(kwargs, _alias_map) # anything that comes in as 'None', drop so the default thing @@ -3270,7 +3271,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, Examples -------- - .. plot:: mpl_examples/statistics/boxplot_demo.py + .. plot:: auto_examples/statistics/plot_boxplot.py """ @@ -3540,7 +3541,7 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True, Examples -------- - .. plot:: mpl_examples/statistics/bxp_demo.py + .. plot:: auto_examples/statistics/plot_bxp.py """ # lists of artists to be output @@ -6102,7 +6103,7 @@ def hist(self, x, bins=None, range=None, normed=False, weights=None, Examples -------- - .. plot:: mpl_examples/statistics/histogram_demo_features.py + .. plot:: auto_examples/statistics/plot_histogram_features.py """ # Avoid shadowing the builtin. @@ -6486,7 +6487,7 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None, Examples -------- - .. plot:: mpl_examples/statistics/plot_hist.py + .. plot:: auto_examples/statistics/plot_hist.py """ h, xedges, yedges = np.histogram2d(x, y, bins=bins, range=range, From 40eab47fdbdd6925cded8e7f252a264d9028c33d Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Fri, 10 Mar 2017 23:17:17 -0800 Subject: [PATCH 08/27] =?UTF-8?q?DOC=20pie=20and=20polar=20charts=20is=20n?= =?UTF-8?q?ow=20full=C2=A0SG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/users/github_stats.rst | 2 +- doc/users/screenshots.rst | 2 +- .../{pie_demo_features.py => plot_pie_features.py} | 0 .../{polar_bar_demo.py => plot_polar_bar.py} | 0 .../{polar_scatter_demo.py => plot_polar_scatter.py} | 0 examples/tests/backend_driver.py | 4 ++-- lib/matplotlib/pyplot.py | 2 +- 7 files changed, 5 insertions(+), 5 deletions(-) rename examples/pie_and_polar_charts/{pie_demo_features.py => plot_pie_features.py} (100%) rename examples/pie_and_polar_charts/{polar_bar_demo.py => plot_polar_bar.py} (100%) rename examples/pie_and_polar_charts/{polar_scatter_demo.py => plot_polar_scatter.py} (100%) diff --git a/doc/users/github_stats.rst b/doc/users/github_stats.rst index e0b9a0ea48f8..a71525d2317c 100644 --- a/doc/users/github_stats.rst +++ b/doc/users/github_stats.rst @@ -1397,7 +1397,7 @@ Issues (889): * :ghissue:`6509`: pylab image_masked is broken * :ghissue:`6657`: appveyor is failing on pre-install * :ghissue:`6610`: Icons for Tk are not antialiased. -* :ghissue:`6687`: Small issues with the example ``polar_scatter_demo.py`` +* :ghissue:`6687`: Small issues with the example ``plot_polar_scatter.py`` * :ghissue:`6541`: Time to deprecate the GTK backend * :ghissue:`6680`: Minor typo in the docstring of ``IdentityTransform``? * :ghissue:`6670`: plt.text object updating incorrectly with blit=False diff --git a/doc/users/screenshots.rst b/doc/users/screenshots.rst index 1692aad7e024..c4cd32a37908 100644 --- a/doc/users/screenshots.rst +++ b/doc/users/screenshots.rst @@ -117,7 +117,7 @@ exploding one or more wedges from the center of the pie, and a shadow effect. Take a close look at the attached code, which generates this figure in just a few lines of code. -.. plot:: mpl_examples/pie_and_polar_charts/pie_demo_features.py +.. plot:: auto_examples/pie_and_polar_charts/plot_pie_features.py .. _screenshots_table_demo: diff --git a/examples/pie_and_polar_charts/pie_demo_features.py b/examples/pie_and_polar_charts/plot_pie_features.py similarity index 100% rename from examples/pie_and_polar_charts/pie_demo_features.py rename to examples/pie_and_polar_charts/plot_pie_features.py diff --git a/examples/pie_and_polar_charts/polar_bar_demo.py b/examples/pie_and_polar_charts/plot_polar_bar.py similarity index 100% rename from examples/pie_and_polar_charts/polar_bar_demo.py rename to examples/pie_and_polar_charts/plot_polar_bar.py diff --git a/examples/pie_and_polar_charts/polar_scatter_demo.py b/examples/pie_and_polar_charts/plot_polar_scatter.py similarity index 100% rename from examples/pie_and_polar_charts/polar_scatter_demo.py rename to examples/pie_and_polar_charts/plot_polar_scatter.py diff --git a/examples/tests/backend_driver.py b/examples/tests/backend_driver.py index 8dcf2271677d..7e269561ce52 100644 --- a/examples/tests/backend_driver.py +++ b/examples/tests/backend_driver.py @@ -86,8 +86,8 @@ files['pie'] = [ 'pie_demo.py', - 'polar_bar_demo.py', - 'polar_scatter_demo.py', + 'plot_polar_bar.py', + 'plot_polar_scatter.py', ] files['text_labels_and_annotations'] = [ diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index 3a8f70f761b6..f3cc40e70d17 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -1037,7 +1037,7 @@ def subplot(*args, **kwargs): For additional information on :func:`axes` and :func:`subplot` keyword arguments. - :file:`examples/pie_and_polar_charts/polar_scatter_demo.py` + :file:`auto_examples/pie_and_polar_charts/plot_polar_scatter.py` For an example **Example:** From 973812488fd29ac4c1592a3812809a83fae286fc Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Sat, 11 Mar 2017 10:38:21 -0800 Subject: [PATCH 09/27] DOC subplots, axes and figures are now full SG --- doc/users/screenshots.rst | 2 +- examples/images_contours_and_fields/README.txt | 4 ++++ examples/subplots_axes_and_figures/README.txt | 4 ++++ ...it_celsius_scales.py => plot_fahrenheit_celsius_scales.py} | 0 .../{subplot_demo.py => plot_subplot.py} | 0 lib/matplotlib/pyplot.py | 2 +- 6 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 examples/images_contours_and_fields/README.txt create mode 100644 examples/subplots_axes_and_figures/README.txt rename examples/subplots_axes_and_figures/{fahrenheit_celsius_scales.py => plot_fahrenheit_celsius_scales.py} (100%) rename examples/subplots_axes_and_figures/{subplot_demo.py => plot_subplot.py} (100%) diff --git a/doc/users/screenshots.rst b/doc/users/screenshots.rst index c4cd32a37908..bc176e34d7e5 100644 --- a/doc/users/screenshots.rst +++ b/doc/users/screenshots.rst @@ -22,7 +22,7 @@ Subplot demo Multiple axes (i.e. subplots) are created with the :func:`~matplotlib.pyplot.subplot` command: -.. plot:: mpl_examples/subplots_axes_and_figures/subplot_demo.py +.. plot:: auto_examples/subplots_axes_and_figures/plot_subplot.py .. _screenshots_histogram_demo: diff --git a/examples/images_contours_and_fields/README.txt b/examples/images_contours_and_fields/README.txt new file mode 100644 index 000000000000..882de6f57c37 --- /dev/null +++ b/examples/images_contours_and_fields/README.txt @@ -0,0 +1,4 @@ +.. _images_contours_and_fields_examples: + +Images, contours and fields +=========================== diff --git a/examples/subplots_axes_and_figures/README.txt b/examples/subplots_axes_and_figures/README.txt new file mode 100644 index 000000000000..4ed26f5ef72f --- /dev/null +++ b/examples/subplots_axes_and_figures/README.txt @@ -0,0 +1,4 @@ +.. _subplots_axes_and_figures_examples: + +Subplots, axes and figures +========================== diff --git a/examples/subplots_axes_and_figures/fahrenheit_celsius_scales.py b/examples/subplots_axes_and_figures/plot_fahrenheit_celsius_scales.py similarity index 100% rename from examples/subplots_axes_and_figures/fahrenheit_celsius_scales.py rename to examples/subplots_axes_and_figures/plot_fahrenheit_celsius_scales.py diff --git a/examples/subplots_axes_and_figures/subplot_demo.py b/examples/subplots_axes_and_figures/plot_subplot.py similarity index 100% rename from examples/subplots_axes_and_figures/subplot_demo.py rename to examples/subplots_axes_and_figures/plot_subplot.py diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index f3cc40e70d17..d4df4880fc75 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -1042,7 +1042,7 @@ def subplot(*args, **kwargs): **Example:** - .. plot:: mpl_examples/subplots_axes_and_figures/subplot_demo.py + .. plot:: auto_examples/subplots_axes_and_figures/plot_subplot.py """ # if subplot called without arguments, create subplot(1,1,1) From 8f8d31615863b868d686fce2a7d139af685e158e Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Sun, 12 Mar 2017 14:52:52 -0700 Subject: [PATCH 10/27] DOC added ticks and spines to sphinx-gallery --- examples/ticks_and_spines/README.txt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 examples/ticks_and_spines/README.txt diff --git a/examples/ticks_and_spines/README.txt b/examples/ticks_and_spines/README.txt new file mode 100644 index 000000000000..e7869c5a08d1 --- /dev/null +++ b/examples/ticks_and_spines/README.txt @@ -0,0 +1,4 @@ +.. _ticks_and_spines_examples: + +Ticks and spines +================ From 55a584031fde234c8184e4794e064262a52fec16 Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Thu, 16 Mar 2017 11:28:49 -0700 Subject: [PATCH 11/27] DOC image, contours and fields are fully SG compatible --- doc/users/prev_whats_new/whats_new_1.2.rst | 2 +- doc/users/screenshots.rst | 2 +- .../{contourf_log.py => plot_contourf_log.py} | 0 .../{image_demo_clip_path.py => plot_image_clip_path.py} | 0 .../{image_demo.py => plot_image_demo.py} | 0 .../{interpolation_methods.py => plot_interpolation_methods.py} | 0 .../{pcolormesh_levels.py => plot_pcolormesh_levels.py} | 0 ...{streamplot_demo_features.py => plot_streamplot_features.py} | 0 .../{streamplot_demo_masking.py => plot_streamplot_masking.py} | 0 ...lot_demo_start_points.py => plot_streamplot_start_points.py} | 0 10 files changed, 2 insertions(+), 2 deletions(-) rename examples/images_contours_and_fields/{contourf_log.py => plot_contourf_log.py} (100%) rename examples/images_contours_and_fields/{image_demo_clip_path.py => plot_image_clip_path.py} (100%) rename examples/images_contours_and_fields/{image_demo.py => plot_image_demo.py} (100%) rename examples/images_contours_and_fields/{interpolation_methods.py => plot_interpolation_methods.py} (100%) rename examples/images_contours_and_fields/{pcolormesh_levels.py => plot_pcolormesh_levels.py} (100%) rename examples/images_contours_and_fields/{streamplot_demo_features.py => plot_streamplot_features.py} (100%) rename examples/images_contours_and_fields/{streamplot_demo_masking.py => plot_streamplot_masking.py} (100%) rename examples/images_contours_and_fields/{streamplot_demo_start_points.py => plot_streamplot_start_points.py} (100%) diff --git a/doc/users/prev_whats_new/whats_new_1.2.rst b/doc/users/prev_whats_new/whats_new_1.2.rst index 7f64c1e724c1..91f8e1fdd910 100644 --- a/doc/users/prev_whats_new/whats_new_1.2.rst +++ b/doc/users/prev_whats_new/whats_new_1.2.rst @@ -152,7 +152,7 @@ In addition to simply plotting the streamlines of the vector field, line widths of the streamlines to a separate parameter, such as the speed or local intensity of the vector field. -.. plot:: mpl_examples/images_contours_and_fields/streamplot_demo_features.py +.. plot:: mpl_examples/images_contours_and_fields/plot_streamplot_features.py New hist functionality diff --git a/doc/users/screenshots.rst b/doc/users/screenshots.rst index bc176e34d7e5..3fe6b9274bf8 100644 --- a/doc/users/screenshots.rst +++ b/doc/users/screenshots.rst @@ -71,7 +71,7 @@ a vector field. In addition to simply plotting the streamlines, it allows you to map the colors and/or line widths of streamlines to a separate parameter, such as the speed or local intensity of the vector field. -.. plot:: mpl_examples/images_contours_and_fields/streamplot_demo_features.py +.. plot:: auto_examples/images_contours_and_fields/plot_streamplot_features.py This feature complements the :meth:`~matplotlib.pyplot.quiver` function for plotting vector fields. Thanks to Tom Flannaghan and Tony Yu for adding the diff --git a/examples/images_contours_and_fields/contourf_log.py b/examples/images_contours_and_fields/plot_contourf_log.py similarity index 100% rename from examples/images_contours_and_fields/contourf_log.py rename to examples/images_contours_and_fields/plot_contourf_log.py diff --git a/examples/images_contours_and_fields/image_demo_clip_path.py b/examples/images_contours_and_fields/plot_image_clip_path.py similarity index 100% rename from examples/images_contours_and_fields/image_demo_clip_path.py rename to examples/images_contours_and_fields/plot_image_clip_path.py diff --git a/examples/images_contours_and_fields/image_demo.py b/examples/images_contours_and_fields/plot_image_demo.py similarity index 100% rename from examples/images_contours_and_fields/image_demo.py rename to examples/images_contours_and_fields/plot_image_demo.py diff --git a/examples/images_contours_and_fields/interpolation_methods.py b/examples/images_contours_and_fields/plot_interpolation_methods.py similarity index 100% rename from examples/images_contours_and_fields/interpolation_methods.py rename to examples/images_contours_and_fields/plot_interpolation_methods.py diff --git a/examples/images_contours_and_fields/pcolormesh_levels.py b/examples/images_contours_and_fields/plot_pcolormesh_levels.py similarity index 100% rename from examples/images_contours_and_fields/pcolormesh_levels.py rename to examples/images_contours_and_fields/plot_pcolormesh_levels.py diff --git a/examples/images_contours_and_fields/streamplot_demo_features.py b/examples/images_contours_and_fields/plot_streamplot_features.py similarity index 100% rename from examples/images_contours_and_fields/streamplot_demo_features.py rename to examples/images_contours_and_fields/plot_streamplot_features.py diff --git a/examples/images_contours_and_fields/streamplot_demo_masking.py b/examples/images_contours_and_fields/plot_streamplot_masking.py similarity index 100% rename from examples/images_contours_and_fields/streamplot_demo_masking.py rename to examples/images_contours_and_fields/plot_streamplot_masking.py diff --git a/examples/images_contours_and_fields/streamplot_demo_start_points.py b/examples/images_contours_and_fields/plot_streamplot_start_points.py similarity index 100% rename from examples/images_contours_and_fields/streamplot_demo_start_points.py rename to examples/images_contours_and_fields/plot_streamplot_start_points.py From 9bf91a8dcd23bf86a15ca5fd9ce05d957c3c35da Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Thu, 16 Mar 2017 11:36:45 -0700 Subject: [PATCH 12/27] DOC showcase are fully SG compatible --- doc/users/prev_whats_new/whats_new_1.3.rst | 2 +- doc/users/screenshots.rst | 2 +- examples/showcase/{anatomy.py => plot_anatomy.py} | 0 ...degrees_by_gender.py => plot_bachelors_degrees_by_gender.py} | 0 examples/showcase/{firefox.py => plot_firefox.py} | 0 examples/showcase/{integral_demo.py => plot_integral.py} | 0 examples/showcase/{mandelbrot.py => plot_mandelbrot.py} | 0 examples/showcase/{xkcd.py => plot_xkcd.py} | 0 8 files changed, 2 insertions(+), 2 deletions(-) rename examples/showcase/{anatomy.py => plot_anatomy.py} (100%) rename examples/showcase/{bachelors_degrees_by_gender.py => plot_bachelors_degrees_by_gender.py} (100%) rename examples/showcase/{firefox.py => plot_firefox.py} (100%) rename examples/showcase/{integral_demo.py => plot_integral.py} (100%) rename examples/showcase/{mandelbrot.py => plot_mandelbrot.py} (100%) rename examples/showcase/{xkcd.py => plot_xkcd.py} (100%) diff --git a/doc/users/prev_whats_new/whats_new_1.3.rst b/doc/users/prev_whats_new/whats_new_1.3.rst index e6372b004d28..9b00c18b101f 100644 --- a/doc/users/prev_whats_new/whats_new_1.3.rst +++ b/doc/users/prev_whats_new/whats_new_1.3.rst @@ -91,7 +91,7 @@ before creating your plot. For really fine control, it is also possible to modify each artist's sketch parameters individually with :meth:`matplotlib.artist.Artist.set_sketch_params`. -.. plot:: mpl_examples/showcase/xkcd.py +.. plot:: auto_examples/showcase/plot_xkcd.py Updated Axes3D.contour methods ------------------------------ diff --git a/doc/users/screenshots.rst b/doc/users/screenshots.rst index 3fe6b9274bf8..4a46f6602374 100644 --- a/doc/users/screenshots.rst +++ b/doc/users/screenshots.rst @@ -278,4 +278,4 @@ XKCD-style sketch plots matplotlib supports plotting in the style of `xkcd `. -.. plot:: mpl_examples/showcase/xkcd.py +.. plot:: mpl_examples/showcase/plot_xkcd.py diff --git a/examples/showcase/anatomy.py b/examples/showcase/plot_anatomy.py similarity index 100% rename from examples/showcase/anatomy.py rename to examples/showcase/plot_anatomy.py diff --git a/examples/showcase/bachelors_degrees_by_gender.py b/examples/showcase/plot_bachelors_degrees_by_gender.py similarity index 100% rename from examples/showcase/bachelors_degrees_by_gender.py rename to examples/showcase/plot_bachelors_degrees_by_gender.py diff --git a/examples/showcase/firefox.py b/examples/showcase/plot_firefox.py similarity index 100% rename from examples/showcase/firefox.py rename to examples/showcase/plot_firefox.py diff --git a/examples/showcase/integral_demo.py b/examples/showcase/plot_integral.py similarity index 100% rename from examples/showcase/integral_demo.py rename to examples/showcase/plot_integral.py diff --git a/examples/showcase/mandelbrot.py b/examples/showcase/plot_mandelbrot.py similarity index 100% rename from examples/showcase/mandelbrot.py rename to examples/showcase/plot_mandelbrot.py diff --git a/examples/showcase/xkcd.py b/examples/showcase/plot_xkcd.py similarity index 100% rename from examples/showcase/xkcd.py rename to examples/showcase/plot_xkcd.py From f50ab00a580234046a202bae931d8d1a47cbd3ea Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Thu, 16 Mar 2017 11:42:15 -0700 Subject: [PATCH 13/27] DOC text, labels and annotations are fully SG compatible --- .../{accented_text.py => plot_accented_text.py} | 0 .../{autowrap_demo.py => plot_autowrap.py} | 0 .../{rainbow_text.py => plot_rainbow_text.py} | 0 .../{text_alignment.py => plot_text_alignment.py} | 0 .../{text_demo_fontdict.py => plot_text_fontdict.py} | 0 .../{text_rotation.py => plot_text_rotation.py} | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename examples/text_labels_and_annotations/{accented_text.py => plot_accented_text.py} (100%) rename examples/text_labels_and_annotations/{autowrap_demo.py => plot_autowrap.py} (100%) rename examples/text_labels_and_annotations/{rainbow_text.py => plot_rainbow_text.py} (100%) rename examples/text_labels_and_annotations/{text_alignment.py => plot_text_alignment.py} (100%) rename examples/text_labels_and_annotations/{text_demo_fontdict.py => plot_text_fontdict.py} (100%) rename examples/text_labels_and_annotations/{text_rotation.py => plot_text_rotation.py} (100%) diff --git a/examples/text_labels_and_annotations/accented_text.py b/examples/text_labels_and_annotations/plot_accented_text.py similarity index 100% rename from examples/text_labels_and_annotations/accented_text.py rename to examples/text_labels_and_annotations/plot_accented_text.py diff --git a/examples/text_labels_and_annotations/autowrap_demo.py b/examples/text_labels_and_annotations/plot_autowrap.py similarity index 100% rename from examples/text_labels_and_annotations/autowrap_demo.py rename to examples/text_labels_and_annotations/plot_autowrap.py diff --git a/examples/text_labels_and_annotations/rainbow_text.py b/examples/text_labels_and_annotations/plot_rainbow_text.py similarity index 100% rename from examples/text_labels_and_annotations/rainbow_text.py rename to examples/text_labels_and_annotations/plot_rainbow_text.py diff --git a/examples/text_labels_and_annotations/text_alignment.py b/examples/text_labels_and_annotations/plot_text_alignment.py similarity index 100% rename from examples/text_labels_and_annotations/text_alignment.py rename to examples/text_labels_and_annotations/plot_text_alignment.py diff --git a/examples/text_labels_and_annotations/text_demo_fontdict.py b/examples/text_labels_and_annotations/plot_text_fontdict.py similarity index 100% rename from examples/text_labels_and_annotations/text_demo_fontdict.py rename to examples/text_labels_and_annotations/plot_text_fontdict.py diff --git a/examples/text_labels_and_annotations/text_rotation.py b/examples/text_labels_and_annotations/plot_text_rotation.py similarity index 100% rename from examples/text_labels_and_annotations/text_rotation.py rename to examples/text_labels_and_annotations/plot_text_rotation.py From 7c79b12480817ca1aaeb64b7f4f1baaf4d5d2b69 Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Thu, 16 Mar 2017 11:55:39 -0700 Subject: [PATCH 14/27] DOC tick and spines is now full SG compatible --- examples/ticks_and_spines/{spines_demo.py => plot_spines.py} | 0 .../{spines_demo_dropped.py => plot_spines_dropped.py} | 0 .../{tick-formatters.py => plot_tick-formatters.py} | 0 .../ticks_and_spines/{tick-locators.py => plot_tick-locators.py} | 0 ...tick_labels_from_values.py => plot_tick_labels_from_values.py} | 0 .../{ticklabels_demo_rotation.py => plot_ticklabels_rotation.py} | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename examples/ticks_and_spines/{spines_demo.py => plot_spines.py} (100%) rename examples/ticks_and_spines/{spines_demo_dropped.py => plot_spines_dropped.py} (100%) rename examples/ticks_and_spines/{tick-formatters.py => plot_tick-formatters.py} (100%) rename examples/ticks_and_spines/{tick-locators.py => plot_tick-locators.py} (100%) rename examples/ticks_and_spines/{tick_labels_from_values.py => plot_tick_labels_from_values.py} (100%) rename examples/ticks_and_spines/{ticklabels_demo_rotation.py => plot_ticklabels_rotation.py} (100%) diff --git a/examples/ticks_and_spines/spines_demo.py b/examples/ticks_and_spines/plot_spines.py similarity index 100% rename from examples/ticks_and_spines/spines_demo.py rename to examples/ticks_and_spines/plot_spines.py diff --git a/examples/ticks_and_spines/spines_demo_dropped.py b/examples/ticks_and_spines/plot_spines_dropped.py similarity index 100% rename from examples/ticks_and_spines/spines_demo_dropped.py rename to examples/ticks_and_spines/plot_spines_dropped.py diff --git a/examples/ticks_and_spines/tick-formatters.py b/examples/ticks_and_spines/plot_tick-formatters.py similarity index 100% rename from examples/ticks_and_spines/tick-formatters.py rename to examples/ticks_and_spines/plot_tick-formatters.py diff --git a/examples/ticks_and_spines/tick-locators.py b/examples/ticks_and_spines/plot_tick-locators.py similarity index 100% rename from examples/ticks_and_spines/tick-locators.py rename to examples/ticks_and_spines/plot_tick-locators.py diff --git a/examples/ticks_and_spines/tick_labels_from_values.py b/examples/ticks_and_spines/plot_tick_labels_from_values.py similarity index 100% rename from examples/ticks_and_spines/tick_labels_from_values.py rename to examples/ticks_and_spines/plot_tick_labels_from_values.py diff --git a/examples/ticks_and_spines/ticklabels_demo_rotation.py b/examples/ticks_and_spines/plot_ticklabels_rotation.py similarity index 100% rename from examples/ticks_and_spines/ticklabels_demo_rotation.py rename to examples/ticks_and_spines/plot_ticklabels_rotation.py From 1ed25aa30fe9dfbe2e562bc03b34d6672ee6e6bd Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Thu, 16 Mar 2017 18:46:15 -0700 Subject: [PATCH 15/27] DOC shapes and collections is now fully SG compatible --- examples/shapes_and_collections/README.txt | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 examples/shapes_and_collections/README.txt diff --git a/examples/shapes_and_collections/README.txt b/examples/shapes_and_collections/README.txt new file mode 100644 index 000000000000..bce3cbe038e3 --- /dev/null +++ b/examples/shapes_and_collections/README.txt @@ -0,0 +1,5 @@ +.. _shapes_and_collections_examples: + + +Shapes and collections +====================== From 8bc4597d73c909753bd95be891adffe8819dc507 Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Sun, 19 Mar 2017 13:25:16 -0700 Subject: [PATCH 16/27] DOC mplot3d is fully SG-compatible --- doc/mpl_toolkits/index.rst | 2 +- doc/mpl_toolkits/mplot3d/tutorial.rst | 38 +++++++++---------- doc/users/prev_whats_new/whats_new_1.1.rst | 4 +- doc/users/prev_whats_new/whats_new_1.2.rst | 2 +- doc/users/prev_whats_new/whats_new_1.3.rst | 2 +- doc/users/prev_whats_new/whats_new_1.4.rst | 2 +- doc/users/prev_whats_new/whats_new_1.5.rst | 2 +- doc/users/screenshots.rst | 2 +- examples/mplot3d/README.txt | 4 ++ ...ions3d_demo.py => plot_2dcollections3d.py} | 0 .../{bars3d_demo.py => plot_bars3d.py} | 0 .../{contour3d_demo.py => plot_contour3d.py} | 0 ...contour3d_demo2.py => plot_contour3d_2.py} | 0 ...contour3d_demo3.py => plot_contour3d_3.py} | 0 ...{contourf3d_demo.py => plot_contourf3d.py} | 0 ...ntourf3d_demo2.py => plot_contourf3d_2.py} | 0 ...ce.py => plot_custom_shaded_3d_surface.py} | 0 .../{hist3d_demo.py => plot_hist3d.py} | 0 .../{lines3d_demo.py => plot_lines3d.py} | 0 ..._attractor.py => plot_lorenz_attractor.py} | 0 ...ubplots_demo.py => plot_mixed_subplots.py} | 0 .../{offset_demo.py => plot_offset.py} | 0 ...athpatch3d_demo.py => plot_pathpatch3d.py} | 0 .../{polys3d_demo.py => plot_polys3d.py} | 0 .../{quiver3d_demo.py => plot_quiver3d.py} | 0 ...e_axes3d_demo.py => plot_rotate_axes3d.py} | 0 .../{scatter3d_demo.py => plot_scatter3d.py} | 0 .../{subplot3d_demo.py => plot_subplot3d.py} | 0 .../{surface3d_demo.py => plot_surface3d.py} | 0 ...surface3d_demo2.py => plot_surface3d_2.py} | 0 ...surface3d_demo3.py => plot_surface3d_3.py} | 0 ...adial_demo.py => plot_surface3d_radial.py} | 0 .../{text3d_demo.py => plot_text3d.py} | 12 ++++-- ...contour3d_demo.py => plot_tricontour3d.py} | 0 ...ntourf3d_demo.py => plot_tricontourf3d.py} | 0 .../{trisurf3d_demo.py => plot_trisurf3d.py} | 0 ...trisurf3d_demo2.py => plot_trisurf3d_2.py} | 0 .../{wire3d_demo.py => plot_wire3d.py} | 0 ...ation_demo.py => plot_wire3d_animation.py} | 0 ...o_stride.py => plot_wire3d_zero_stride.py} | 0 lib/mpl_toolkits/mplot3d/axes3d.py | 4 +- 41 files changed, 41 insertions(+), 33 deletions(-) create mode 100644 examples/mplot3d/README.txt rename examples/mplot3d/{2dcollections3d_demo.py => plot_2dcollections3d.py} (100%) rename examples/mplot3d/{bars3d_demo.py => plot_bars3d.py} (100%) rename examples/mplot3d/{contour3d_demo.py => plot_contour3d.py} (100%) rename examples/mplot3d/{contour3d_demo2.py => plot_contour3d_2.py} (100%) rename examples/mplot3d/{contour3d_demo3.py => plot_contour3d_3.py} (100%) rename examples/mplot3d/{contourf3d_demo.py => plot_contourf3d.py} (100%) rename examples/mplot3d/{contourf3d_demo2.py => plot_contourf3d_2.py} (100%) rename examples/mplot3d/{custom_shaded_3d_surface.py => plot_custom_shaded_3d_surface.py} (100%) rename examples/mplot3d/{hist3d_demo.py => plot_hist3d.py} (100%) rename examples/mplot3d/{lines3d_demo.py => plot_lines3d.py} (100%) rename examples/mplot3d/{lorenz_attractor.py => plot_lorenz_attractor.py} (100%) rename examples/mplot3d/{mixed_subplots_demo.py => plot_mixed_subplots.py} (100%) rename examples/mplot3d/{offset_demo.py => plot_offset.py} (100%) rename examples/mplot3d/{pathpatch3d_demo.py => plot_pathpatch3d.py} (100%) rename examples/mplot3d/{polys3d_demo.py => plot_polys3d.py} (100%) rename examples/mplot3d/{quiver3d_demo.py => plot_quiver3d.py} (100%) rename examples/mplot3d/{rotate_axes3d_demo.py => plot_rotate_axes3d.py} (100%) rename examples/mplot3d/{scatter3d_demo.py => plot_scatter3d.py} (100%) rename examples/mplot3d/{subplot3d_demo.py => plot_subplot3d.py} (100%) rename examples/mplot3d/{surface3d_demo.py => plot_surface3d.py} (100%) rename examples/mplot3d/{surface3d_demo2.py => plot_surface3d_2.py} (100%) rename examples/mplot3d/{surface3d_demo3.py => plot_surface3d_3.py} (100%) rename examples/mplot3d/{surface3d_radial_demo.py => plot_surface3d_radial.py} (100%) rename examples/mplot3d/{text3d_demo.py => plot_text3d.py} (76%) rename examples/mplot3d/{tricontour3d_demo.py => plot_tricontour3d.py} (100%) rename examples/mplot3d/{tricontourf3d_demo.py => plot_tricontourf3d.py} (100%) rename examples/mplot3d/{trisurf3d_demo.py => plot_trisurf3d.py} (100%) rename examples/mplot3d/{trisurf3d_demo2.py => plot_trisurf3d_2.py} (100%) rename examples/mplot3d/{wire3d_demo.py => plot_wire3d.py} (100%) rename examples/mplot3d/{wire3d_animation_demo.py => plot_wire3d_animation.py} (100%) rename examples/mplot3d/{wire3d_zero_stride.py => plot_wire3d_zero_stride.py} (100%) diff --git a/doc/mpl_toolkits/index.rst b/doc/mpl_toolkits/index.rst index ae4f59b022a4..54ffc11776f4 100644 --- a/doc/mpl_toolkits/index.rst +++ b/doc/mpl_toolkits/index.rst @@ -30,7 +30,7 @@ plotting (scatter, surf, line, mesh) tools. Not the fastest or feature complete 3D library out there, but ships with Matplotlib and thus may be a lighter weight solution for some use cases. -.. plot:: mpl_examples/mplot3d/contourf3d_demo2.py +.. plot:: auto_examples/mplot3d/plot_contourf3d_2.py .. _toolkit_axes_grid1: diff --git a/doc/mpl_toolkits/mplot3d/tutorial.rst b/doc/mpl_toolkits/mplot3d/tutorial.rst index b0cda8661968..a7f2a14871ba 100644 --- a/doc/mpl_toolkits/mplot3d/tutorial.rst +++ b/doc/mpl_toolkits/mplot3d/tutorial.rst @@ -36,7 +36,7 @@ Line plots ==================== .. automethod:: Axes3D.plot -.. plot:: mpl_examples/mplot3d/lines3d_demo.py +.. plot:: auto_examples/mplot3d/plot_lines3d.py .. _scatter3d: @@ -44,7 +44,7 @@ Scatter plots ============= .. automethod:: Axes3D.scatter -.. plot:: mpl_examples/mplot3d/scatter3d_demo.py +.. plot:: auto_examples/mplot3d/plot_scatter3d.py .. _wireframe: @@ -52,7 +52,7 @@ Wireframe plots =============== .. automethod:: Axes3D.plot_wireframe -.. plot:: mpl_examples/mplot3d/wire3d_demo.py +.. plot:: auto_examples/mplot3d/plot_wire3d.py .. _surface: @@ -60,9 +60,9 @@ Surface plots ============= .. automethod:: Axes3D.plot_surface -.. plot:: mpl_examples/mplot3d/surface3d_demo.py -.. plot:: mpl_examples/mplot3d/surface3d_demo2.py -.. plot:: mpl_examples/mplot3d/surface3d_demo3.py +.. plot:: auto_examples/mplot3d/plot_surface3d.py +.. plot:: auto_examples/mplot3d/plot_surface3d_2.py +.. plot:: auto_examples/mplot3d/plot_surface3d_3.py .. _trisurface: @@ -70,7 +70,7 @@ Tri-Surface plots ================= .. automethod:: Axes3D.plot_trisurf -.. plot:: mpl_examples/mplot3d/trisurf3d_demo.py +.. plot:: auto_examples/mplot3d/plot_trisurf3d.py .. _contour3d: @@ -79,9 +79,9 @@ Contour plots ============= .. automethod:: Axes3D.contour -.. plot:: mpl_examples/mplot3d/contour3d_demo.py -.. plot:: mpl_examples/mplot3d/contour3d_demo2.py -.. plot:: mpl_examples/mplot3d/contour3d_demo3.py +.. plot:: auto_examples/mplot3d/plot_contour3d.py +.. plot:: auto_examples/mplot3d/plot_contour3d_2.py +.. plot:: auto_examples/mplot3d/plot_contour3d_3.py .. _contourf3d: @@ -89,8 +89,8 @@ Filled contour plots ==================== .. automethod:: Axes3D.contourf -.. plot:: mpl_examples/mplot3d/contourf3d_demo.py -.. plot:: mpl_examples/mplot3d/contourf3d_demo2.py +.. plot:: auto_examples/mplot3d/plot_contourf3d.py +.. plot:: auto_examples/mplot3d/plot_contourf3d_2.py .. versionadded:: 1.1.0 The feature demoed in the second contourf3d example was enabled as a @@ -102,7 +102,7 @@ Polygon plots ==================== .. automethod:: Axes3D.add_collection3d -.. plot:: mpl_examples/mplot3d/polys3d_demo.py +.. plot:: auto_examples/mplot3d/plot_polys3d.py .. _bar3d: @@ -110,7 +110,7 @@ Bar plots ==================== .. automethod:: Axes3D.bar -.. plot:: mpl_examples/mplot3d/bars3d_demo.py +.. plot:: auto_examples/mplot3d/plot_bars3d.py .. _quiver3d: @@ -118,13 +118,13 @@ Quiver ==================== .. automethod:: Axes3D.quiver -.. plot:: mpl_examples/mplot3d/quiver3d_demo.py +.. plot:: auto_examples/mplot3d/plot_quiver3d.py .. _2dcollections3d: 2D plots in 3D ==================== -.. plot:: mpl_examples/mplot3d/2dcollections3d_demo.py +.. plot:: auto_examples/mplot3d/plot_2dcollections3d.py .. _text3d: @@ -132,7 +132,7 @@ Text ==================== .. automethod:: Axes3D.text -.. plot:: mpl_examples/mplot3d/text3d_demo.py +.. plot:: auto_examples/mplot3d/plot_text3d.py .. _3dsubplots: @@ -146,5 +146,5 @@ in the same figure. Subplotting 3D plots was added in v1.0.0. Earlier version can not do this. -.. plot:: mpl_examples/mplot3d/subplot3d_demo.py -.. plot:: mpl_examples/mplot3d/mixed_subplots_demo.py +.. plot:: auto_examples/mplot3d/plot_subplot3d.py +.. plot:: auto_examples/mplot3d/plot_mixed_subplots.py diff --git a/doc/users/prev_whats_new/whats_new_1.1.rst b/doc/users/prev_whats_new/whats_new_1.1.rst index d7fda134a626..7003d90124e3 100644 --- a/doc/users/prev_whats_new/whats_new_1.1.rst +++ b/doc/users/prev_whats_new/whats_new_1.1.rst @@ -135,12 +135,12 @@ as 2D plotting, Ben Root has made several improvements to the * Ticker offset display added: -.. plot:: mpl_examples/mplot3d/offset_demo.py +.. plot:: auto_examples/mplot3d/plot_offset.py * :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.contourf` gains *zdir* and *offset* kwargs. You can now do this: -.. plot:: mpl_examples/mplot3d/contourf3d_demo2.py +.. plot:: auto_examples/mplot3d/plot_contourf3d_2.py Numerix support removed ----------------------- diff --git a/doc/users/prev_whats_new/whats_new_1.2.rst b/doc/users/prev_whats_new/whats_new_1.2.rst index 91f8e1fdd910..50a8fdf89ff3 100644 --- a/doc/users/prev_whats_new/whats_new_1.2.rst +++ b/doc/users/prev_whats_new/whats_new_1.2.rst @@ -61,7 +61,7 @@ Damon McDougall added a new plotting method for the :mod:`~mpl_toolkits.mplot3d` toolkit called :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf`. -.. plot:: mpl_examples/mplot3d/trisurf3d_demo.py +.. plot:: auto_examples/mplot3d/plot_trisurf3d.py Control the lengths of colorbar extensions ------------------------------------------ diff --git a/doc/users/prev_whats_new/whats_new_1.3.rst b/doc/users/prev_whats_new/whats_new_1.3.rst index 9b00c18b101f..cfaa741b550d 100644 --- a/doc/users/prev_whats_new/whats_new_1.3.rst +++ b/doc/users/prev_whats_new/whats_new_1.3.rst @@ -100,7 +100,7 @@ Damon McDougall updated the :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.tricontourf` methods to allow 3D contour plots on abitrary unstructured user-specified triangulations. -.. plot:: mpl_examples/mplot3d/tricontour3d_demo.py +.. plot:: auto_examples/mplot3d/plot_tricontour3d.py New eventplot plot type ``````````````````````` diff --git a/doc/users/prev_whats_new/whats_new_1.4.rst b/doc/users/prev_whats_new/whats_new_1.4.rst index b361b605a19c..0789c9e6aa65 100644 --- a/doc/users/prev_whats_new/whats_new_1.4.rst +++ b/doc/users/prev_whats_new/whats_new_1.4.rst @@ -243,7 +243,7 @@ term project. This feature is documented in :func:`~mpl_toolkits.mplot3d.Axes3D. The team members are: Ryan Steve D'Souza, Victor B, xbtsw, Yang Wang, David, Caradec Bisesar and Vlad Vassilovski. -.. plot:: mpl_examples/mplot3d/quiver3d_demo.py +.. plot:: auto_examples/mplot3d/plot_quiver3d.py polar-plot r-tick locations ``````````````````````````` diff --git a/doc/users/prev_whats_new/whats_new_1.5.rst b/doc/users/prev_whats_new/whats_new_1.5.rst index 4085726d8d9e..daaa27aa23e4 100644 --- a/doc/users/prev_whats_new/whats_new_1.5.rst +++ b/doc/users/prev_whats_new/whats_new_1.5.rst @@ -109,7 +109,7 @@ You can even multiply cyclers, which is like using `itertools.product()` on two or more property cycles. Remember to use parentheses if writing a multi-line `prop_cycle` parameter. -.. plot:: mpl_examples/color/plot_color_cycle.py +.. plot:: auto_examples/color/plot_color_cycle.py New Colormaps diff --git a/doc/users/screenshots.rst b/doc/users/screenshots.rst index 4a46f6602374..e64287294cb9 100644 --- a/doc/users/screenshots.rst +++ b/doc/users/screenshots.rst @@ -54,7 +54,7 @@ The mplot3d toolkit (see :ref:`toolkit_mplot3d-tutorial` and :ref:`mplot3d-examples-index`) has support for simple 3d graphs including surface, wireframe, scatter, and bar charts. -.. plot:: mpl_examples/mplot3d/surface3d_demo.py +.. plot:: auto_examples/mplot3d/plot_surface3d.py Thanks to John Porter, Jonathon Taylor, Reinier Heeres, and Ben Root for the `mplot3d` toolkit. This toolkit is included with all standard matplotlib diff --git a/examples/mplot3d/README.txt b/examples/mplot3d/README.txt new file mode 100644 index 000000000000..7a7402f9c8d2 --- /dev/null +++ b/examples/mplot3d/README.txt @@ -0,0 +1,4 @@ +.. _mplot3d_example: + +mplot3d toolkit +=============== diff --git a/examples/mplot3d/2dcollections3d_demo.py b/examples/mplot3d/plot_2dcollections3d.py similarity index 100% rename from examples/mplot3d/2dcollections3d_demo.py rename to examples/mplot3d/plot_2dcollections3d.py diff --git a/examples/mplot3d/bars3d_demo.py b/examples/mplot3d/plot_bars3d.py similarity index 100% rename from examples/mplot3d/bars3d_demo.py rename to examples/mplot3d/plot_bars3d.py diff --git a/examples/mplot3d/contour3d_demo.py b/examples/mplot3d/plot_contour3d.py similarity index 100% rename from examples/mplot3d/contour3d_demo.py rename to examples/mplot3d/plot_contour3d.py diff --git a/examples/mplot3d/contour3d_demo2.py b/examples/mplot3d/plot_contour3d_2.py similarity index 100% rename from examples/mplot3d/contour3d_demo2.py rename to examples/mplot3d/plot_contour3d_2.py diff --git a/examples/mplot3d/contour3d_demo3.py b/examples/mplot3d/plot_contour3d_3.py similarity index 100% rename from examples/mplot3d/contour3d_demo3.py rename to examples/mplot3d/plot_contour3d_3.py diff --git a/examples/mplot3d/contourf3d_demo.py b/examples/mplot3d/plot_contourf3d.py similarity index 100% rename from examples/mplot3d/contourf3d_demo.py rename to examples/mplot3d/plot_contourf3d.py diff --git a/examples/mplot3d/contourf3d_demo2.py b/examples/mplot3d/plot_contourf3d_2.py similarity index 100% rename from examples/mplot3d/contourf3d_demo2.py rename to examples/mplot3d/plot_contourf3d_2.py diff --git a/examples/mplot3d/custom_shaded_3d_surface.py b/examples/mplot3d/plot_custom_shaded_3d_surface.py similarity index 100% rename from examples/mplot3d/custom_shaded_3d_surface.py rename to examples/mplot3d/plot_custom_shaded_3d_surface.py diff --git a/examples/mplot3d/hist3d_demo.py b/examples/mplot3d/plot_hist3d.py similarity index 100% rename from examples/mplot3d/hist3d_demo.py rename to examples/mplot3d/plot_hist3d.py diff --git a/examples/mplot3d/lines3d_demo.py b/examples/mplot3d/plot_lines3d.py similarity index 100% rename from examples/mplot3d/lines3d_demo.py rename to examples/mplot3d/plot_lines3d.py diff --git a/examples/mplot3d/lorenz_attractor.py b/examples/mplot3d/plot_lorenz_attractor.py similarity index 100% rename from examples/mplot3d/lorenz_attractor.py rename to examples/mplot3d/plot_lorenz_attractor.py diff --git a/examples/mplot3d/mixed_subplots_demo.py b/examples/mplot3d/plot_mixed_subplots.py similarity index 100% rename from examples/mplot3d/mixed_subplots_demo.py rename to examples/mplot3d/plot_mixed_subplots.py diff --git a/examples/mplot3d/offset_demo.py b/examples/mplot3d/plot_offset.py similarity index 100% rename from examples/mplot3d/offset_demo.py rename to examples/mplot3d/plot_offset.py diff --git a/examples/mplot3d/pathpatch3d_demo.py b/examples/mplot3d/plot_pathpatch3d.py similarity index 100% rename from examples/mplot3d/pathpatch3d_demo.py rename to examples/mplot3d/plot_pathpatch3d.py diff --git a/examples/mplot3d/polys3d_demo.py b/examples/mplot3d/plot_polys3d.py similarity index 100% rename from examples/mplot3d/polys3d_demo.py rename to examples/mplot3d/plot_polys3d.py diff --git a/examples/mplot3d/quiver3d_demo.py b/examples/mplot3d/plot_quiver3d.py similarity index 100% rename from examples/mplot3d/quiver3d_demo.py rename to examples/mplot3d/plot_quiver3d.py diff --git a/examples/mplot3d/rotate_axes3d_demo.py b/examples/mplot3d/plot_rotate_axes3d.py similarity index 100% rename from examples/mplot3d/rotate_axes3d_demo.py rename to examples/mplot3d/plot_rotate_axes3d.py diff --git a/examples/mplot3d/scatter3d_demo.py b/examples/mplot3d/plot_scatter3d.py similarity index 100% rename from examples/mplot3d/scatter3d_demo.py rename to examples/mplot3d/plot_scatter3d.py diff --git a/examples/mplot3d/subplot3d_demo.py b/examples/mplot3d/plot_subplot3d.py similarity index 100% rename from examples/mplot3d/subplot3d_demo.py rename to examples/mplot3d/plot_subplot3d.py diff --git a/examples/mplot3d/surface3d_demo.py b/examples/mplot3d/plot_surface3d.py similarity index 100% rename from examples/mplot3d/surface3d_demo.py rename to examples/mplot3d/plot_surface3d.py diff --git a/examples/mplot3d/surface3d_demo2.py b/examples/mplot3d/plot_surface3d_2.py similarity index 100% rename from examples/mplot3d/surface3d_demo2.py rename to examples/mplot3d/plot_surface3d_2.py diff --git a/examples/mplot3d/surface3d_demo3.py b/examples/mplot3d/plot_surface3d_3.py similarity index 100% rename from examples/mplot3d/surface3d_demo3.py rename to examples/mplot3d/plot_surface3d_3.py diff --git a/examples/mplot3d/surface3d_radial_demo.py b/examples/mplot3d/plot_surface3d_radial.py similarity index 100% rename from examples/mplot3d/surface3d_radial_demo.py rename to examples/mplot3d/plot_surface3d_radial.py diff --git a/examples/mplot3d/text3d_demo.py b/examples/mplot3d/plot_text3d.py similarity index 76% rename from examples/mplot3d/text3d_demo.py rename to examples/mplot3d/plot_text3d.py index 6b1963e2a43b..d26cf2b74eaf 100644 --- a/examples/mplot3d/text3d_demo.py +++ b/examples/mplot3d/plot_text3d.py @@ -6,10 +6,14 @@ Demonstrates the placement of text annotations on a 3D plot. Functionality shown: -- Using the text function with three types of 'zdir' values: None, - an axis name (ex. 'x'), or a direction tuple (ex. (1, 1, 0)). -- Using the text function with the color keyword. -- Using the text2D function to place text on a fixed position on the ax object. + + - Using the text function with three types of 'zdir' values: None, an axis + name (ex. 'x'), or a direction tuple (ex. (1, 1, 0)). + - Using the text function with the color keyword. + + - Using the text2D function to place text on a fixed position on the ax + object. + ''' from mpl_toolkits.mplot3d import Axes3D diff --git a/examples/mplot3d/tricontour3d_demo.py b/examples/mplot3d/plot_tricontour3d.py similarity index 100% rename from examples/mplot3d/tricontour3d_demo.py rename to examples/mplot3d/plot_tricontour3d.py diff --git a/examples/mplot3d/tricontourf3d_demo.py b/examples/mplot3d/plot_tricontourf3d.py similarity index 100% rename from examples/mplot3d/tricontourf3d_demo.py rename to examples/mplot3d/plot_tricontourf3d.py diff --git a/examples/mplot3d/trisurf3d_demo.py b/examples/mplot3d/plot_trisurf3d.py similarity index 100% rename from examples/mplot3d/trisurf3d_demo.py rename to examples/mplot3d/plot_trisurf3d.py diff --git a/examples/mplot3d/trisurf3d_demo2.py b/examples/mplot3d/plot_trisurf3d_2.py similarity index 100% rename from examples/mplot3d/trisurf3d_demo2.py rename to examples/mplot3d/plot_trisurf3d_2.py diff --git a/examples/mplot3d/wire3d_demo.py b/examples/mplot3d/plot_wire3d.py similarity index 100% rename from examples/mplot3d/wire3d_demo.py rename to examples/mplot3d/plot_wire3d.py diff --git a/examples/mplot3d/wire3d_animation_demo.py b/examples/mplot3d/plot_wire3d_animation.py similarity index 100% rename from examples/mplot3d/wire3d_animation_demo.py rename to examples/mplot3d/plot_wire3d_animation.py diff --git a/examples/mplot3d/wire3d_zero_stride.py b/examples/mplot3d/plot_wire3d_zero_stride.py similarity index 100% rename from examples/mplot3d/wire3d_zero_stride.py rename to examples/mplot3d/plot_wire3d_zero_stride.py diff --git a/lib/mpl_toolkits/mplot3d/axes3d.py b/lib/mpl_toolkits/mplot3d/axes3d.py index 664098934366..1d343786a636 100644 --- a/lib/mpl_toolkits/mplot3d/axes3d.py +++ b/lib/mpl_toolkits/mplot3d/axes3d.py @@ -1911,8 +1911,8 @@ def plot_trisurf(self, *args, **kwargs): **Examples:** - .. plot:: mpl_examples/mplot3d/trisurf3d_demo.py - .. plot:: mpl_examples/mplot3d/trisurf3d_demo2.py + .. plot:: auto_examples/mplot3d/plot_trisurf3d.py + .. plot:: auto_examples/mplot3d/plot_trisurf3d_2.py .. versionadded:: 1.2.0 This plotting function was added for the v1.2.0 release. From d5583f89021b88c1cebdd74cc011bb1cf0645a7c Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Sun, 19 Mar 2017 14:43:46 -0700 Subject: [PATCH 17/27] DOC The gallery is now built with sphinx-gallery :D --- .gitignore | 1 - doc/_templates/index.html | 5 +- doc/_templates/layout.html | 2 +- doc/conf.py | 2 - doc/devel/contributing.rst | 2 +- doc/sphinxext/gen_gallery.py | 170 ----------------------------------- 6 files changed, 5 insertions(+), 177 deletions(-) delete mode 100644 doc/sphinxext/gen_gallery.py diff --git a/.gitignore b/.gitignore index 665e53c49fe1..ebde87dedfdc 100644 --- a/.gitignore +++ b/.gitignore @@ -59,7 +59,6 @@ lib/matplotlib/mpl-data/matplotlibrc # Documentation generated files # ################################# doc/examples -doc/_templates/gallery.html doc/users/installing.rst doc/_static/matplotlibrc doc/pyplots/tex_demo.png diff --git a/doc/_templates/index.html b/doc/_templates/index.html index 81cbed47a348..4a8b83c29951 100644 --- a/doc/_templates/index.html +++ b/doc/_templates/index.html @@ -75,7 +75,8 @@

Introduction

Matplotlib tries to make easy things easy and hard things possible. You can generate plots, histograms, power spectra, bar charts, errorcharts, scatterplots, etc., with just a few lines of code. - For a sampling, see the screenshots, thumbnail gallery, and + For a sampling, see the screenshots, thumbnail gallery, and examples directory

For simple plotting the pyplot module provides a @@ -99,7 +100,7 @@

Documentation

Trying to learn how to do a particular kind of plot? Check out - the gallery, examples, + the gallery, examples, or the list of plotting commands.

diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html index aa1f278d51b5..3d26e5ba4256 100644 --- a/doc/_templates/layout.html +++ b/doc/_templates/layout.html @@ -39,7 +39,7 @@

{{ _('Navigation') }}

  • home
  • examples
  • -
  • gallery
  • +
  • gallery
  • pyplot
  • docs »
  • diff --git a/doc/conf.py b/doc/conf.py index 23dda7f9ef3e..8e8ac4228066 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -32,7 +32,6 @@ 'sphinx.ext.inheritance_diagram', 'sphinx_gallery.gen_gallery', 'sphinxext.gen_rst', - 'sphinxext.gen_gallery', 'matplotlib.sphinxext.plot_directive', 'sphinxext.github', 'numpydoc'] @@ -251,7 +250,6 @@ # Additional templates that should be rendered to pages, maps page names to # template names. html_additional_pages = {'index': 'index.html', - 'gallery':'gallery.html', 'citing': 'citing.html'} # If false, no module index is generated. diff --git a/doc/devel/contributing.rst b/doc/devel/contributing.rst index 5ec25366c716..b3e2e654e03b 100644 --- a/doc/devel/contributing.rst +++ b/doc/devel/contributing.rst @@ -442,7 +442,7 @@ We have hundreds of examples in subdirectories of :file:`matplotlib/examples`, and these are automatically generated when the website is built to show up both in the `examples <../examples/index.html>`_ and `gallery -<../gallery.html>`_ sections of the website. +<../auto_examples/index.html>`_ sections of the website. Any sample data that the example uses should be kept small and distributed with Matplotlib in the diff --git a/doc/sphinxext/gen_gallery.py b/doc/sphinxext/gen_gallery.py deleted file mode 100644 index 812a0b4ad6ab..000000000000 --- a/doc/sphinxext/gen_gallery.py +++ /dev/null @@ -1,170 +0,0 @@ -# -*- coding: utf-8 -*- -import codecs -import os -import re -import glob -import warnings - -import sphinx.errors - -import matplotlib.image as image - - -exclude_example_sections = ['units'] -multiimage = re.compile('(.*?)(_\d\d){1,2}') - -# generate a thumbnail gallery of examples -gallery_template = u"""\ -{{% extends "layout.html" %}} -{{% set title = "Thumbnail gallery" %}} - - -{{% block body %}} - -

    Click on any image to see full size image and source code

    -
    - -
  • Gallery -
      - {toc} -
    -
  • - -{gallery} - -{{% endblock %}} -""" - -header_template = u"""\ -
    -

    - {title}¶ -

    """ - -link_template = """\ -
    - {basename}
    -
    {title}
    -
    -""" - -toc_template = u"""\ -
  • {title}
  • """ - - -def make_thumbnail(args): - image.thumbnail(args[0], args[1], 0.3) - - -def out_of_date(original, derived): - return (not os.path.exists(derived) or - os.stat(derived).st_mtime < os.stat(original).st_mtime) - - -def gen_gallery(app, doctree): - if app.builder.name not in ('html', 'htmlhelp'): - return - - outdir = app.builder.outdir - rootdir = 'plot_directive/mpl_examples' - - example_sections = list(app.builder.config.mpl_example_sections) - for i, (subdir, title) in enumerate(example_sections): - if subdir in exclude_example_sections: - example_sections.pop(i) - - # images we want to skip for the gallery because they are an unusual - # size that doesn't layout well in a table, or because they may be - # redundant with other images or uninteresting - skips = {'mathtext_examples', - 'matshow_02', - 'matshow_03', - 'matplotlib_icon'} - - thumbnails = {} - rows = [] - toc_rows = [] - - for subdir, title in example_sections: - rows.append(header_template.format(title=title, section=subdir)) - toc_rows.append(toc_template.format(title=title, section=subdir)) - - origdir = os.path.join('build', rootdir, subdir) - thumbdir = os.path.join(outdir, rootdir, subdir, 'thumbnails') - if not os.path.exists(thumbdir): - os.makedirs(thumbdir) - - data = [] - - for filename in sorted(glob.glob(os.path.join(origdir, '*.png'))): - if filename.endswith("hires.png"): - continue - - path, filename = os.path.split(filename) - basename, ext = os.path.splitext(filename) - if basename in skips: - continue - - # Create thumbnails based on images in tmpdir, and place - # them within the build tree - orig_path = str(os.path.join(origdir, filename)) - thumb_path = str(os.path.join(thumbdir, filename)) - if out_of_date(orig_path, thumb_path) or True: - thumbnails[orig_path] = thumb_path - - m = multiimage.match(basename) - if m is not None: - basename = m.group(1) - - data.append((subdir, basename, - os.path.join(rootdir, subdir, 'thumbnails', filename))) - - for (subdir, basename, thumbfile) in data: - if thumbfile is not None: - link = 'examples/%s/%s.html'%(subdir, basename) - rows.append(link_template.format(link=link, - thumb=thumbfile, - basename=basename, - title=basename)) - - if len(data) == 0: - warnings.warn("No thumbnails were found in %s" % subdir) - - # Close out the
    opened up at the top of this loop - rows.append(u"
    ") - - content = gallery_template.format(toc=u'\n'.join(toc_rows), - gallery=u'\n'.join(rows)) - - # Only write out the file if the contents have actually changed. - # Otherwise, this triggers a full rebuild of the docs - - gallery_path = os.path.join(app.builder.srcdir, - '_templates', 'gallery.html') - if os.path.exists(gallery_path): - with codecs.open(gallery_path, 'r', encoding='utf-8') as fh: - regenerate = fh.read() != content - else: - regenerate = True - - if regenerate: - with codecs.open(gallery_path, 'w', encoding='utf-8') as fh: - fh.write(content) - - for key in app.builder.status_iterator( - iter(thumbnails), "generating thumbnails... ", - length=len(thumbnails)): - if out_of_date(key, thumbnails[key]): - image.thumbnail(key, thumbnails[key], 0.3) - - -def setup(app): - app.connect('env-updated', gen_gallery) - - try: # multiple plugins may use mpl_example_sections - app.add_config_value('mpl_example_sections', [], True) - except sphinx.errors.ExtensionError: - pass # mpl_example_sections already defined - - metadata = {'parallel_read_safe': True, 'parallel_write_safe': True} - return metadata From 8f5f185677e20d179e0ba3f4effd1ef19bfa02ef Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Sun, 19 Mar 2017 14:58:15 -0700 Subject: [PATCH 18/27] DOC all plots in the gallery now produce images --- examples/color/{named_colors.py => plot_named_colors.py} | 0 .../{style_sheets_reference.py => plot_style_sheets_reference.py} | 0 .../{ganged_plots.py => plot_ganged_plots.py} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename examples/color/{named_colors.py => plot_named_colors.py} (100%) rename examples/style_sheets/{style_sheets_reference.py => plot_style_sheets_reference.py} (100%) rename examples/subplots_axes_and_figures/{ganged_plots.py => plot_ganged_plots.py} (100%) diff --git a/examples/color/named_colors.py b/examples/color/plot_named_colors.py similarity index 100% rename from examples/color/named_colors.py rename to examples/color/plot_named_colors.py diff --git a/examples/style_sheets/style_sheets_reference.py b/examples/style_sheets/plot_style_sheets_reference.py similarity index 100% rename from examples/style_sheets/style_sheets_reference.py rename to examples/style_sheets/plot_style_sheets_reference.py diff --git a/examples/subplots_axes_and_figures/ganged_plots.py b/examples/subplots_axes_and_figures/plot_ganged_plots.py similarity index 100% rename from examples/subplots_axes_and_figures/ganged_plots.py rename to examples/subplots_axes_and_figures/plot_ganged_plots.py From 9d805a1246045ba8de46920023f357da43780a84 Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Sun, 19 Mar 2017 15:15:19 -0700 Subject: [PATCH 19/27] DOC API is now fully SG-compatible --- examples/api/{README => README.txt} | 0 examples/api/plot_patch_collection.py | 2 ++ 2 files changed, 2 insertions(+) rename examples/api/{README => README.txt} (100%) diff --git a/examples/api/README b/examples/api/README.txt similarity index 100% rename from examples/api/README rename to examples/api/README.txt diff --git a/examples/api/plot_patch_collection.py b/examples/api/plot_patch_collection.py index a39ab4ad56a0..d3e6ec5d0556 100644 --- a/examples/api/plot_patch_collection.py +++ b/examples/api/plot_patch_collection.py @@ -2,6 +2,8 @@ ============================ Circles, Wedges and Polygons ============================ + +This example demonstrates how to use patch collections. """ import numpy as np From 4a13444b2ce5f579e762264c4bb6bafe375e8921 Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Sun, 19 Mar 2017 15:21:11 -0700 Subject: [PATCH 20/27] DOC linking to auto_examples when possible --- doc/users/prev_whats_new/whats_new_1.1.rst | 2 +- doc/users/prev_whats_new/whats_new_1.2.rst | 2 +- doc/users/prev_whats_new/whats_new_1.4.rst | 2 +- doc/users/prev_whats_new/whats_new_1.5.rst | 2 +- doc/users/screenshots.rst | 10 +++++----- lib/matplotlib/axes/_axes.py | 4 ++-- lib/matplotlib/path.py | 2 +- lib/matplotlib/sankey.py | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/users/prev_whats_new/whats_new_1.1.rst b/doc/users/prev_whats_new/whats_new_1.1.rst index 7003d90124e3..d00db765e133 100644 --- a/doc/users/prev_whats_new/whats_new_1.1.rst +++ b/doc/users/prev_whats_new/whats_new_1.1.rst @@ -20,7 +20,7 @@ Kevin Davies has extended Yannick Copin's original Sankey example into a module (:ref:`api-plot_sankey_basics`, :ref:`api-plot_sankey_links`, :ref:`api-plot_sankey_rankine`). -.. plot:: mpl_examples/api/plot_sankey_rankine.py +.. plot:: auto_examples/api/plot_sankey_rankine.py Animation diff --git a/doc/users/prev_whats_new/whats_new_1.2.rst b/doc/users/prev_whats_new/whats_new_1.2.rst index 50a8fdf89ff3..979afc4b1c6b 100644 --- a/doc/users/prev_whats_new/whats_new_1.2.rst +++ b/doc/users/prev_whats_new/whats_new_1.2.rst @@ -152,7 +152,7 @@ In addition to simply plotting the streamlines of the vector field, line widths of the streamlines to a separate parameter, such as the speed or local intensity of the vector field. -.. plot:: mpl_examples/images_contours_and_fields/plot_streamplot_features.py +.. plot:: auto_examples/images_contours_and_fields/plot_streamplot_features.py New hist functionality diff --git a/doc/users/prev_whats_new/whats_new_1.4.rst b/doc/users/prev_whats_new/whats_new_1.4.rst index 0789c9e6aa65..2d77f145c0db 100644 --- a/doc/users/prev_whats_new/whats_new_1.4.rst +++ b/doc/users/prev_whats_new/whats_new_1.4.rst @@ -160,7 +160,7 @@ matplotlib internals were cleaned up to support using such transforms in :class:`~matplotlib.Axes`. This transform is important for some plot types, specifically the Skew-T used in meteorology. -.. plot:: mpl_examples/api/plot_skewt.py +.. plot:: auto_examples/api/plot_skewt.py Support for specifying properties of wedge and text in pie charts. `````````````````````````````````````````````````````````````````` diff --git a/doc/users/prev_whats_new/whats_new_1.5.rst b/doc/users/prev_whats_new/whats_new_1.5.rst index daaa27aa23e4..ed943a243be1 100644 --- a/doc/users/prev_whats_new/whats_new_1.5.rst +++ b/doc/users/prev_whats_new/whats_new_1.5.rst @@ -367,7 +367,7 @@ kwargs names is not ideal, but `Axes.fill_between` already has a This is particularly useful for plotting pre-binned histograms. -.. plot:: mpl_examples/api/plot_filled_step.py +.. plot:: auto_examples/api/plot_filled_step.py Square Plot diff --git a/doc/users/screenshots.rst b/doc/users/screenshots.rst index e64287294cb9..bf1a7039e50b 100644 --- a/doc/users/screenshots.rst +++ b/doc/users/screenshots.rst @@ -43,7 +43,7 @@ Path demo You can add arbitrary paths in matplotlib using the :mod:`matplotlib.path` module: -.. plot:: mpl_examples/shapes_and_collections/plot_path_patch.py +.. plot:: auto_examples/shapes_and_collections/plot_path_patch.py .. _screenshots_mplot3d_surface: @@ -166,7 +166,7 @@ Fill demo The :func:`~matplotlib.pyplot.fill` command lets you plot filled curves and polygons: -.. plot:: mpl_examples/lines_bars_and_markers/plot_fill.py +.. plot:: auto_examples/lines_bars_and_markers/plot_fill.py Thanks to Andrew Straw for adding this function. @@ -178,7 +178,7 @@ Date demo You can plot date data with major and minor ticks and custom tick formatters for both. -.. plot:: mpl_examples/api/plot_date.py +.. plot:: auto_examples/api/plot_date.py See :mod:`matplotlib.ticker` and :mod:`matplotlib.dates` for details and usage. @@ -217,7 +217,7 @@ The :func:`~matplotlib.pyplot.legend` command automatically generates figure legends, with MATLAB-compatible legend placement commands. -.. plot:: mpl_examples/api/plot_legend.py +.. plot:: auto_examples/api/plot_legend.py Thanks to Charles Twardy for input on the legend command. @@ -278,4 +278,4 @@ XKCD-style sketch plots matplotlib supports plotting in the style of `xkcd `. -.. plot:: mpl_examples/showcase/plot_xkcd.py +.. plot:: auto_examples/showcase/plot_xkcd.py diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 00fdc1ca62e2..d1f72a8e0869 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -507,7 +507,7 @@ def legend(self, *args, **kwargs): Examples -------- - .. plot:: mpl_examples/api/plot_legend.py + .. plot:: auto_examples/api/plot_legend.py """ handlers = kwargs.get('handler_map', {}) or {} @@ -3917,7 +3917,7 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None, Examples -------- - .. plot:: mpl_examples/shapes_and_collections/plot_scatter.py + .. plot:: auto_examples/shapes_and_collections/plot_scatter.py """ diff --git a/lib/matplotlib/path.py b/lib/matplotlib/path.py index 7b895db13b2e..cad9be9b1a0f 100644 --- a/lib/matplotlib/path.py +++ b/lib/matplotlib/path.py @@ -317,7 +317,7 @@ def make_compound_path_from_polys(cls, XY): numsides x 2) numpy array of vertices. Return object is a :class:`Path` - .. plot:: mpl_examples/api/plot_histogram_path.py + .. plot:: auto_examples/api/plot_histogram_path.py """ diff --git a/lib/matplotlib/sankey.py b/lib/matplotlib/sankey.py index b5f8fb51696a..c7254cb7b150 100644 --- a/lib/matplotlib/sankey.py +++ b/lib/matplotlib/sankey.py @@ -118,7 +118,7 @@ def __init__(self, ax=None, scale=1.0, unit='', format='%G', gap=0.25, **Examples:** - .. plot:: mpl_examples/api/plot_sankey_basics.py + .. plot:: auto_examples/api/plot_sankey_basics.py """ # Check the arguments. if gap < 0: From 8b764e7d6c20e40a7014939003410079c37ab962 Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Fri, 24 Mar 2017 18:01:49 -0700 Subject: [PATCH 21/27] DOC FIX nitpicks in the conf file --- doc/conf.py | 5 +++-- lib/matplotlib/axes/_axes.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 8e8ac4228066..fd8ab383c2db 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -57,8 +57,8 @@ try: import sphinx_gallery except ImportError: - raise ImportError("No module named sphinx-gallery - you need to install " - "numpydoc to build the documentation.") + raise ImportError("No module named sphinx_gallery - you need to install " + "sphinx_gallery to build the documentation.") try: import colorspacious @@ -112,6 +112,7 @@ 'gallery_dirs' : 'auto_examples'} plot_gallery = True + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index d1f72a8e0869..6a4da2a1628d 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -2567,7 +2567,7 @@ def pie(self, x, explode=None, labels=None, colors=None, Examples -------- - .. plot:: mpl_examples/pie_and_polar_charts/pie_demo_features.py + .. plot:: mpl_examples/pie_and_polar_charts/plot_pie_features.py """ From 752cd6460530b922dcfa1706c3461ef08902d71a Mon Sep 17 00:00:00 2001 From: Christopher Holdgraf Date: Sun, 9 Apr 2017 19:42:35 -0700 Subject: [PATCH 22/27] switching to examples_gallery --- .gitignore | 2 +- doc/_templates/index.html | 4 +-- doc/_templates/layout.html | 2 +- doc/conf.py | 2 +- doc/devel/contributing.rst | 2 +- doc/mpl_toolkits/index.rst | 2 +- doc/mpl_toolkits/mplot3d/tutorial.rst | 38 +++++++++++----------- doc/users/prev_whats_new/whats_new_1.1.rst | 6 ++-- doc/users/prev_whats_new/whats_new_1.2.rst | 4 +-- doc/users/prev_whats_new/whats_new_1.3.rst | 4 +-- doc/users/prev_whats_new/whats_new_1.4.rst | 4 +-- doc/users/prev_whats_new/whats_new_1.5.rst | 4 +-- doc/users/screenshots.rst | 20 ++++++------ lib/matplotlib/axes/_axes.py | 18 +++++----- lib/matplotlib/path.py | 2 +- lib/matplotlib/pyplot.py | 4 +-- lib/matplotlib/sankey.py | 2 +- lib/mpl_toolkits/mplot3d/axes3d.py | 4 +-- 18 files changed, 62 insertions(+), 62 deletions(-) diff --git a/.gitignore b/.gitignore index ebde87dedfdc..4c40caa49977 100644 --- a/.gitignore +++ b/.gitignore @@ -32,7 +32,7 @@ build # sphinx build directory doc/_build -doc/auto_examples +doc/examples_gallery # setup.py dist directory dist # Egg metadata diff --git a/doc/_templates/index.html b/doc/_templates/index.html index 4a8b83c29951..c928d237c4d1 100644 --- a/doc/_templates/index.html +++ b/doc/_templates/index.html @@ -76,7 +76,7 @@

    Introduction

    You can generate plots, histograms, power spectra, bar charts, errorcharts, scatterplots, etc., with just a few lines of code. For a sampling, see the screenshots, thumbnail gallery, and + }}">screenshots, thumbnail gallery, and examples directory

    For simple plotting the pyplot module provides a @@ -100,7 +100,7 @@

    Documentation

    Trying to learn how to do a particular kind of plot? Check out - the gallery, examples, + the gallery, examples, or the list of plotting commands.

    diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html index 3d26e5ba4256..f340a5617556 100644 --- a/doc/_templates/layout.html +++ b/doc/_templates/layout.html @@ -39,7 +39,7 @@

    {{ _('Navigation') }}

  • home
  • examples
  • -
  • gallery
  • +
  • gallery
  • pyplot
  • docs »
  • diff --git a/doc/conf.py b/doc/conf.py index fd8ab383c2db..8353d4c47a69 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -109,7 +109,7 @@ # path to your examples scripts 'examples_dirs' : '../examples', # path where to save gallery generated examples - 'gallery_dirs' : 'auto_examples'} + 'gallery_dirs' : 'examples_gallery'} plot_gallery = True diff --git a/doc/devel/contributing.rst b/doc/devel/contributing.rst index b3e2e654e03b..e33a4d57659f 100644 --- a/doc/devel/contributing.rst +++ b/doc/devel/contributing.rst @@ -442,7 +442,7 @@ We have hundreds of examples in subdirectories of :file:`matplotlib/examples`, and these are automatically generated when the website is built to show up both in the `examples <../examples/index.html>`_ and `gallery -<../auto_examples/index.html>`_ sections of the website. +<../examples_gallery/index.html>`_ sections of the website. Any sample data that the example uses should be kept small and distributed with Matplotlib in the diff --git a/doc/mpl_toolkits/index.rst b/doc/mpl_toolkits/index.rst index 54ffc11776f4..a740d59013db 100644 --- a/doc/mpl_toolkits/index.rst +++ b/doc/mpl_toolkits/index.rst @@ -30,7 +30,7 @@ plotting (scatter, surf, line, mesh) tools. Not the fastest or feature complete 3D library out there, but ships with Matplotlib and thus may be a lighter weight solution for some use cases. -.. plot:: auto_examples/mplot3d/plot_contourf3d_2.py +.. plot:: examples_gallery/mplot3d/plot_contourf3d_2.py .. _toolkit_axes_grid1: diff --git a/doc/mpl_toolkits/mplot3d/tutorial.rst b/doc/mpl_toolkits/mplot3d/tutorial.rst index a7f2a14871ba..80b0a54a390a 100644 --- a/doc/mpl_toolkits/mplot3d/tutorial.rst +++ b/doc/mpl_toolkits/mplot3d/tutorial.rst @@ -36,7 +36,7 @@ Line plots ==================== .. automethod:: Axes3D.plot -.. plot:: auto_examples/mplot3d/plot_lines3d.py +.. plot:: examples_gallery/mplot3d/plot_lines3d.py .. _scatter3d: @@ -44,7 +44,7 @@ Scatter plots ============= .. automethod:: Axes3D.scatter -.. plot:: auto_examples/mplot3d/plot_scatter3d.py +.. plot:: examples_gallery/mplot3d/plot_scatter3d.py .. _wireframe: @@ -52,7 +52,7 @@ Wireframe plots =============== .. automethod:: Axes3D.plot_wireframe -.. plot:: auto_examples/mplot3d/plot_wire3d.py +.. plot:: examples_gallery/mplot3d/plot_wire3d.py .. _surface: @@ -60,9 +60,9 @@ Surface plots ============= .. automethod:: Axes3D.plot_surface -.. plot:: auto_examples/mplot3d/plot_surface3d.py -.. plot:: auto_examples/mplot3d/plot_surface3d_2.py -.. plot:: auto_examples/mplot3d/plot_surface3d_3.py +.. plot:: examples_gallery/mplot3d/plot_surface3d.py +.. plot:: examples_gallery/mplot3d/plot_surface3d_2.py +.. plot:: examples_gallery/mplot3d/plot_surface3d_3.py .. _trisurface: @@ -70,7 +70,7 @@ Tri-Surface plots ================= .. automethod:: Axes3D.plot_trisurf -.. plot:: auto_examples/mplot3d/plot_trisurf3d.py +.. plot:: examples_gallery/mplot3d/plot_trisurf3d.py .. _contour3d: @@ -79,9 +79,9 @@ Contour plots ============= .. automethod:: Axes3D.contour -.. plot:: auto_examples/mplot3d/plot_contour3d.py -.. plot:: auto_examples/mplot3d/plot_contour3d_2.py -.. plot:: auto_examples/mplot3d/plot_contour3d_3.py +.. plot:: examples_gallery/mplot3d/plot_contour3d.py +.. plot:: examples_gallery/mplot3d/plot_contour3d_2.py +.. plot:: examples_gallery/mplot3d/plot_contour3d_3.py .. _contourf3d: @@ -89,8 +89,8 @@ Filled contour plots ==================== .. automethod:: Axes3D.contourf -.. plot:: auto_examples/mplot3d/plot_contourf3d.py -.. plot:: auto_examples/mplot3d/plot_contourf3d_2.py +.. plot:: examples_gallery/mplot3d/plot_contourf3d.py +.. plot:: examples_gallery/mplot3d/plot_contourf3d_2.py .. versionadded:: 1.1.0 The feature demoed in the second contourf3d example was enabled as a @@ -102,7 +102,7 @@ Polygon plots ==================== .. automethod:: Axes3D.add_collection3d -.. plot:: auto_examples/mplot3d/plot_polys3d.py +.. plot:: examples_gallery/mplot3d/plot_polys3d.py .. _bar3d: @@ -110,7 +110,7 @@ Bar plots ==================== .. automethod:: Axes3D.bar -.. plot:: auto_examples/mplot3d/plot_bars3d.py +.. plot:: examples_gallery/mplot3d/plot_bars3d.py .. _quiver3d: @@ -118,13 +118,13 @@ Quiver ==================== .. automethod:: Axes3D.quiver -.. plot:: auto_examples/mplot3d/plot_quiver3d.py +.. plot:: examples_gallery/mplot3d/plot_quiver3d.py .. _2dcollections3d: 2D plots in 3D ==================== -.. plot:: auto_examples/mplot3d/plot_2dcollections3d.py +.. plot:: examples_gallery/mplot3d/plot_2dcollections3d.py .. _text3d: @@ -132,7 +132,7 @@ Text ==================== .. automethod:: Axes3D.text -.. plot:: auto_examples/mplot3d/plot_text3d.py +.. plot:: examples_gallery/mplot3d/plot_text3d.py .. _3dsubplots: @@ -146,5 +146,5 @@ in the same figure. Subplotting 3D plots was added in v1.0.0. Earlier version can not do this. -.. plot:: auto_examples/mplot3d/plot_subplot3d.py -.. plot:: auto_examples/mplot3d/plot_mixed_subplots.py +.. plot:: examples_gallery/mplot3d/plot_subplot3d.py +.. plot:: examples_gallery/mplot3d/plot_mixed_subplots.py diff --git a/doc/users/prev_whats_new/whats_new_1.1.rst b/doc/users/prev_whats_new/whats_new_1.1.rst index d00db765e133..67a3d3560ad4 100644 --- a/doc/users/prev_whats_new/whats_new_1.1.rst +++ b/doc/users/prev_whats_new/whats_new_1.1.rst @@ -20,7 +20,7 @@ Kevin Davies has extended Yannick Copin's original Sankey example into a module (:ref:`api-plot_sankey_basics`, :ref:`api-plot_sankey_links`, :ref:`api-plot_sankey_rankine`). -.. plot:: auto_examples/api/plot_sankey_rankine.py +.. plot:: examples_gallery/api/plot_sankey_rankine.py Animation @@ -135,12 +135,12 @@ as 2D plotting, Ben Root has made several improvements to the * Ticker offset display added: -.. plot:: auto_examples/mplot3d/plot_offset.py +.. plot:: examples_gallery/mplot3d/plot_offset.py * :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.contourf` gains *zdir* and *offset* kwargs. You can now do this: -.. plot:: auto_examples/mplot3d/plot_contourf3d_2.py +.. plot:: examples_gallery/mplot3d/plot_contourf3d_2.py Numerix support removed ----------------------- diff --git a/doc/users/prev_whats_new/whats_new_1.2.rst b/doc/users/prev_whats_new/whats_new_1.2.rst index 979afc4b1c6b..8017cede2e67 100644 --- a/doc/users/prev_whats_new/whats_new_1.2.rst +++ b/doc/users/prev_whats_new/whats_new_1.2.rst @@ -61,7 +61,7 @@ Damon McDougall added a new plotting method for the :mod:`~mpl_toolkits.mplot3d` toolkit called :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf`. -.. plot:: auto_examples/mplot3d/plot_trisurf3d.py +.. plot:: examples_gallery/mplot3d/plot_trisurf3d.py Control the lengths of colorbar extensions ------------------------------------------ @@ -152,7 +152,7 @@ In addition to simply plotting the streamlines of the vector field, line widths of the streamlines to a separate parameter, such as the speed or local intensity of the vector field. -.. plot:: auto_examples/images_contours_and_fields/plot_streamplot_features.py +.. plot:: examples_gallery/images_contours_and_fields/plot_streamplot_features.py New hist functionality diff --git a/doc/users/prev_whats_new/whats_new_1.3.rst b/doc/users/prev_whats_new/whats_new_1.3.rst index cfaa741b550d..50ef87e035b2 100644 --- a/doc/users/prev_whats_new/whats_new_1.3.rst +++ b/doc/users/prev_whats_new/whats_new_1.3.rst @@ -91,7 +91,7 @@ before creating your plot. For really fine control, it is also possible to modify each artist's sketch parameters individually with :meth:`matplotlib.artist.Artist.set_sketch_params`. -.. plot:: auto_examples/showcase/plot_xkcd.py +.. plot:: examples_gallery/showcase/plot_xkcd.py Updated Axes3D.contour methods ------------------------------ @@ -100,7 +100,7 @@ Damon McDougall updated the :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.tricontourf` methods to allow 3D contour plots on abitrary unstructured user-specified triangulations. -.. plot:: auto_examples/mplot3d/plot_tricontour3d.py +.. plot:: examples_gallery/mplot3d/plot_tricontour3d.py New eventplot plot type ``````````````````````` diff --git a/doc/users/prev_whats_new/whats_new_1.4.rst b/doc/users/prev_whats_new/whats_new_1.4.rst index 2d77f145c0db..fe37fc39f9fd 100644 --- a/doc/users/prev_whats_new/whats_new_1.4.rst +++ b/doc/users/prev_whats_new/whats_new_1.4.rst @@ -160,7 +160,7 @@ matplotlib internals were cleaned up to support using such transforms in :class:`~matplotlib.Axes`. This transform is important for some plot types, specifically the Skew-T used in meteorology. -.. plot:: auto_examples/api/plot_skewt.py +.. plot:: examples_gallery/api/plot_skewt.py Support for specifying properties of wedge and text in pie charts. `````````````````````````````````````````````````````````````````` @@ -243,7 +243,7 @@ term project. This feature is documented in :func:`~mpl_toolkits.mplot3d.Axes3D. The team members are: Ryan Steve D'Souza, Victor B, xbtsw, Yang Wang, David, Caradec Bisesar and Vlad Vassilovski. -.. plot:: auto_examples/mplot3d/plot_quiver3d.py +.. plot:: examples_gallery/mplot3d/plot_quiver3d.py polar-plot r-tick locations ``````````````````````````` diff --git a/doc/users/prev_whats_new/whats_new_1.5.rst b/doc/users/prev_whats_new/whats_new_1.5.rst index ed943a243be1..02fd0591b142 100644 --- a/doc/users/prev_whats_new/whats_new_1.5.rst +++ b/doc/users/prev_whats_new/whats_new_1.5.rst @@ -109,7 +109,7 @@ You can even multiply cyclers, which is like using `itertools.product()` on two or more property cycles. Remember to use parentheses if writing a multi-line `prop_cycle` parameter. -.. plot:: auto_examples/color/plot_color_cycle.py +.. plot:: examples_gallery/color/plot_color_cycle.py New Colormaps @@ -367,7 +367,7 @@ kwargs names is not ideal, but `Axes.fill_between` already has a This is particularly useful for plotting pre-binned histograms. -.. plot:: auto_examples/api/plot_filled_step.py +.. plot:: examples_gallery/api/plot_filled_step.py Square Plot diff --git a/doc/users/screenshots.rst b/doc/users/screenshots.rst index bf1a7039e50b..24604626eca2 100644 --- a/doc/users/screenshots.rst +++ b/doc/users/screenshots.rst @@ -22,7 +22,7 @@ Subplot demo Multiple axes (i.e. subplots) are created with the :func:`~matplotlib.pyplot.subplot` command: -.. plot:: auto_examples/subplots_axes_and_figures/plot_subplot.py +.. plot:: examples_gallery/subplots_axes_and_figures/plot_subplot.py .. _screenshots_histogram_demo: @@ -32,7 +32,7 @@ Histograms The :func:`~matplotlib.pyplot.hist` command automatically generates histograms and returns the bin counts or probabilities: -.. plot:: auto_examples/statistics/plot_histogram_features.py +.. plot:: examples_gallery/statistics/plot_histogram_features.py .. _screenshots_path_demo: @@ -43,7 +43,7 @@ Path demo You can add arbitrary paths in matplotlib using the :mod:`matplotlib.path` module: -.. plot:: auto_examples/shapes_and_collections/plot_path_patch.py +.. plot:: examples_gallery/shapes_and_collections/plot_path_patch.py .. _screenshots_mplot3d_surface: @@ -54,7 +54,7 @@ The mplot3d toolkit (see :ref:`toolkit_mplot3d-tutorial` and :ref:`mplot3d-examples-index`) has support for simple 3d graphs including surface, wireframe, scatter, and bar charts. -.. plot:: auto_examples/mplot3d/plot_surface3d.py +.. plot:: examples_gallery/mplot3d/plot_surface3d.py Thanks to John Porter, Jonathon Taylor, Reinier Heeres, and Ben Root for the `mplot3d` toolkit. This toolkit is included with all standard matplotlib @@ -71,7 +71,7 @@ a vector field. In addition to simply plotting the streamlines, it allows you to map the colors and/or line widths of streamlines to a separate parameter, such as the speed or local intensity of the vector field. -.. plot:: auto_examples/images_contours_and_fields/plot_streamplot_features.py +.. plot:: examples_gallery/images_contours_and_fields/plot_streamplot_features.py This feature complements the :meth:`~matplotlib.pyplot.quiver` function for plotting vector fields. Thanks to Tom Flannaghan and Tony Yu for adding the @@ -117,7 +117,7 @@ exploding one or more wedges from the center of the pie, and a shadow effect. Take a close look at the attached code, which generates this figure in just a few lines of code. -.. plot:: auto_examples/pie_and_polar_charts/plot_pie_features.py +.. plot:: examples_gallery/pie_and_polar_charts/plot_pie_features.py .. _screenshots_table_demo: @@ -166,7 +166,7 @@ Fill demo The :func:`~matplotlib.pyplot.fill` command lets you plot filled curves and polygons: -.. plot:: auto_examples/lines_bars_and_markers/plot_fill.py +.. plot:: examples_gallery/lines_bars_and_markers/plot_fill.py Thanks to Andrew Straw for adding this function. @@ -178,7 +178,7 @@ Date demo You can plot date data with major and minor ticks and custom tick formatters for both. -.. plot:: auto_examples/api/plot_date.py +.. plot:: examples_gallery/api/plot_date.py See :mod:`matplotlib.ticker` and :mod:`matplotlib.dates` for details and usage. @@ -217,7 +217,7 @@ The :func:`~matplotlib.pyplot.legend` command automatically generates figure legends, with MATLAB-compatible legend placement commands. -.. plot:: auto_examples/api/plot_legend.py +.. plot:: examples_gallery/api/plot_legend.py Thanks to Charles Twardy for input on the legend command. @@ -278,4 +278,4 @@ XKCD-style sketch plots matplotlib supports plotting in the style of `xkcd `. -.. plot:: auto_examples/showcase/plot_xkcd.py +.. plot:: examples_gallery/showcase/plot_xkcd.py diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 6a4da2a1628d..15b56e28ea8c 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -507,7 +507,7 @@ def legend(self, *args, **kwargs): Examples -------- - .. plot:: auto_examples/api/plot_legend.py + .. plot:: examples_gallery/api/plot_legend.py """ handlers = kwargs.get('handler_map', {}) or {} @@ -2799,7 +2799,7 @@ def errorbar(self, x, y, yerr=None, xerr=None, Examples -------- - .. plot:: auto_examples/statistics/plot_errorbar.py + .. plot:: examples_gallery/statistics/plot_errorbar.py """ kwargs = cbook.normalize_kwargs(kwargs, _alias_map) @@ -3271,7 +3271,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, Examples -------- - .. plot:: auto_examples/statistics/plot_boxplot.py + .. plot:: examples_gallery/statistics/plot_boxplot.py """ @@ -3541,7 +3541,7 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True, Examples -------- - .. plot:: auto_examples/statistics/plot_bxp.py + .. plot:: examples_gallery/statistics/plot_bxp.py """ # lists of artists to be output @@ -3917,7 +3917,7 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None, Examples -------- - .. plot:: auto_examples/shapes_and_collections/plot_scatter.py + .. plot:: examples_gallery/shapes_and_collections/plot_scatter.py """ @@ -4700,7 +4700,7 @@ def fill(self, *args, **kwargs): Examples -------- - .. plot:: auto_examples/lines_bars_and_markers/plot_fill.py + .. plot:: examples_gallery/lines_bars_and_markers/plot_fill.py """ @@ -6103,7 +6103,7 @@ def hist(self, x, bins=None, range=None, normed=False, weights=None, Examples -------- - .. plot:: auto_examples/statistics/plot_histogram_features.py + .. plot:: examples_gallery/statistics/plot_histogram_features.py """ # Avoid shadowing the builtin. @@ -6487,7 +6487,7 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None, Examples -------- - .. plot:: auto_examples/statistics/plot_hist.py + .. plot:: examples_gallery/statistics/plot_hist.py """ h, xedges, yedges = np.histogram2d(x, y, bins=bins, range=range, @@ -7068,7 +7068,7 @@ def cohere(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, Examples -------- - .. plot:: auto_examples/lines_bars_and_markers/plot_cohere.py + .. plot:: examples_gallery/lines_bars_and_markers/plot_cohere.py """ if not self._hold: self.cla() diff --git a/lib/matplotlib/path.py b/lib/matplotlib/path.py index cad9be9b1a0f..a5a81be7fe9c 100644 --- a/lib/matplotlib/path.py +++ b/lib/matplotlib/path.py @@ -317,7 +317,7 @@ def make_compound_path_from_polys(cls, XY): numsides x 2) numpy array of vertices. Return object is a :class:`Path` - .. plot:: auto_examples/api/plot_histogram_path.py + .. plot:: examples_gallery/api/plot_histogram_path.py """ diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index d4df4880fc75..8a13fec4a10c 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -1037,12 +1037,12 @@ def subplot(*args, **kwargs): For additional information on :func:`axes` and :func:`subplot` keyword arguments. - :file:`auto_examples/pie_and_polar_charts/plot_polar_scatter.py` + :file:`examples_gallery/pie_and_polar_charts/plot_polar_scatter.py` For an example **Example:** - .. plot:: auto_examples/subplots_axes_and_figures/plot_subplot.py + .. plot:: examples_gallery/subplots_axes_and_figures/plot_subplot.py """ # if subplot called without arguments, create subplot(1,1,1) diff --git a/lib/matplotlib/sankey.py b/lib/matplotlib/sankey.py index c7254cb7b150..ed59d6cf803e 100644 --- a/lib/matplotlib/sankey.py +++ b/lib/matplotlib/sankey.py @@ -118,7 +118,7 @@ def __init__(self, ax=None, scale=1.0, unit='', format='%G', gap=0.25, **Examples:** - .. plot:: auto_examples/api/plot_sankey_basics.py + .. plot:: examples_gallery/api/plot_sankey_basics.py """ # Check the arguments. if gap < 0: diff --git a/lib/mpl_toolkits/mplot3d/axes3d.py b/lib/mpl_toolkits/mplot3d/axes3d.py index 1d343786a636..8af1b4d492dd 100644 --- a/lib/mpl_toolkits/mplot3d/axes3d.py +++ b/lib/mpl_toolkits/mplot3d/axes3d.py @@ -1911,8 +1911,8 @@ def plot_trisurf(self, *args, **kwargs): **Examples:** - .. plot:: auto_examples/mplot3d/plot_trisurf3d.py - .. plot:: auto_examples/mplot3d/plot_trisurf3d_2.py + .. plot:: examples_gallery/mplot3d/plot_trisurf3d.py + .. plot:: examples_gallery/mplot3d/plot_trisurf3d_2.py .. versionadded:: 1.2.0 This plotting function was added for the v1.2.0 release. From b571c5196770dfd197d2e64e9e8bfb7eaad803b1 Mon Sep 17 00:00:00 2001 From: Christopher Holdgraf Date: Sun, 9 Apr 2017 22:50:14 -0700 Subject: [PATCH 23/27] calling it 'gallery' --- .gitignore | 2 +- doc/_templates/index.html | 4 +-- doc/_templates/layout.html | 2 +- doc/conf.py | 2 +- doc/devel/contributing.rst | 2 +- doc/mpl_toolkits/index.rst | 2 +- doc/mpl_toolkits/mplot3d/tutorial.rst | 38 +++++++++++----------- doc/users/prev_whats_new/whats_new_1.1.rst | 6 ++-- doc/users/prev_whats_new/whats_new_1.2.rst | 5 +-- doc/users/prev_whats_new/whats_new_1.3.rst | 4 +-- doc/users/prev_whats_new/whats_new_1.4.rst | 4 +-- doc/users/prev_whats_new/whats_new_1.5.rst | 4 +-- doc/users/screenshots.rst | 20 ++++++------ lib/matplotlib/axes/_axes.py | 18 +++++----- lib/matplotlib/path.py | 2 +- lib/matplotlib/pyplot.py | 4 +-- lib/matplotlib/sankey.py | 2 +- lib/mpl_toolkits/mplot3d/axes3d.py | 4 +-- 18 files changed, 63 insertions(+), 62 deletions(-) diff --git a/.gitignore b/.gitignore index 4c40caa49977..f14f5cfe725e 100644 --- a/.gitignore +++ b/.gitignore @@ -32,7 +32,7 @@ build # sphinx build directory doc/_build -doc/examples_gallery +doc/gallery # setup.py dist directory dist # Egg metadata diff --git a/doc/_templates/index.html b/doc/_templates/index.html index c928d237c4d1..034d58b037c6 100644 --- a/doc/_templates/index.html +++ b/doc/_templates/index.html @@ -76,7 +76,7 @@

    Introduction

    You can generate plots, histograms, power spectra, bar charts, errorcharts, scatterplots, etc., with just a few lines of code. For a sampling, see the screenshots, thumbnail gallery, and + }}">screenshots, thumbnail gallery, and examples directory

    For simple plotting the pyplot module provides a @@ -100,7 +100,7 @@

    Documentation

    Trying to learn how to do a particular kind of plot? Check out - the gallery, examples, + the gallery, examples, or the list of plotting commands.

    diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html index f340a5617556..57217105335f 100644 --- a/doc/_templates/layout.html +++ b/doc/_templates/layout.html @@ -39,7 +39,7 @@

    {{ _('Navigation') }}

  • home
  • examples
  • -
  • gallery
  • +
  • gallery
  • pyplot
  • docs »
  • diff --git a/doc/conf.py b/doc/conf.py index 8353d4c47a69..82261bd08834 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -109,7 +109,7 @@ # path to your examples scripts 'examples_dirs' : '../examples', # path where to save gallery generated examples - 'gallery_dirs' : 'examples_gallery'} + 'gallery_dirs' : 'gallery'} plot_gallery = True diff --git a/doc/devel/contributing.rst b/doc/devel/contributing.rst index e33a4d57659f..cfa46f45661f 100644 --- a/doc/devel/contributing.rst +++ b/doc/devel/contributing.rst @@ -442,7 +442,7 @@ We have hundreds of examples in subdirectories of :file:`matplotlib/examples`, and these are automatically generated when the website is built to show up both in the `examples <../examples/index.html>`_ and `gallery -<../examples_gallery/index.html>`_ sections of the website. +<../gallery/index.html>`_ sections of the website. Any sample data that the example uses should be kept small and distributed with Matplotlib in the diff --git a/doc/mpl_toolkits/index.rst b/doc/mpl_toolkits/index.rst index a740d59013db..fd504e4e9dda 100644 --- a/doc/mpl_toolkits/index.rst +++ b/doc/mpl_toolkits/index.rst @@ -30,7 +30,7 @@ plotting (scatter, surf, line, mesh) tools. Not the fastest or feature complete 3D library out there, but ships with Matplotlib and thus may be a lighter weight solution for some use cases. -.. plot:: examples_gallery/mplot3d/plot_contourf3d_2.py +.. plot:: gallery/mplot3d/plot_contourf3d_2.py .. _toolkit_axes_grid1: diff --git a/doc/mpl_toolkits/mplot3d/tutorial.rst b/doc/mpl_toolkits/mplot3d/tutorial.rst index 80b0a54a390a..bb5f0feaa697 100644 --- a/doc/mpl_toolkits/mplot3d/tutorial.rst +++ b/doc/mpl_toolkits/mplot3d/tutorial.rst @@ -36,7 +36,7 @@ Line plots ==================== .. automethod:: Axes3D.plot -.. plot:: examples_gallery/mplot3d/plot_lines3d.py +.. plot:: gallery/mplot3d/plot_lines3d.py .. _scatter3d: @@ -44,7 +44,7 @@ Scatter plots ============= .. automethod:: Axes3D.scatter -.. plot:: examples_gallery/mplot3d/plot_scatter3d.py +.. plot:: gallery/mplot3d/plot_scatter3d.py .. _wireframe: @@ -52,7 +52,7 @@ Wireframe plots =============== .. automethod:: Axes3D.plot_wireframe -.. plot:: examples_gallery/mplot3d/plot_wire3d.py +.. plot:: gallery/mplot3d/plot_wire3d.py .. _surface: @@ -60,9 +60,9 @@ Surface plots ============= .. automethod:: Axes3D.plot_surface -.. plot:: examples_gallery/mplot3d/plot_surface3d.py -.. plot:: examples_gallery/mplot3d/plot_surface3d_2.py -.. plot:: examples_gallery/mplot3d/plot_surface3d_3.py +.. plot:: gallery/mplot3d/plot_surface3d.py +.. plot:: gallery/mplot3d/plot_surface3d_2.py +.. plot:: gallery/mplot3d/plot_surface3d_3.py .. _trisurface: @@ -70,7 +70,7 @@ Tri-Surface plots ================= .. automethod:: Axes3D.plot_trisurf -.. plot:: examples_gallery/mplot3d/plot_trisurf3d.py +.. plot:: gallery/mplot3d/plot_trisurf3d.py .. _contour3d: @@ -79,9 +79,9 @@ Contour plots ============= .. automethod:: Axes3D.contour -.. plot:: examples_gallery/mplot3d/plot_contour3d.py -.. plot:: examples_gallery/mplot3d/plot_contour3d_2.py -.. plot:: examples_gallery/mplot3d/plot_contour3d_3.py +.. plot:: gallery/mplot3d/plot_contour3d.py +.. plot:: gallery/mplot3d/plot_contour3d_2.py +.. plot:: gallery/mplot3d/plot_contour3d_3.py .. _contourf3d: @@ -89,8 +89,8 @@ Filled contour plots ==================== .. automethod:: Axes3D.contourf -.. plot:: examples_gallery/mplot3d/plot_contourf3d.py -.. plot:: examples_gallery/mplot3d/plot_contourf3d_2.py +.. plot:: gallery/mplot3d/plot_contourf3d.py +.. plot:: gallery/mplot3d/plot_contourf3d_2.py .. versionadded:: 1.1.0 The feature demoed in the second contourf3d example was enabled as a @@ -102,7 +102,7 @@ Polygon plots ==================== .. automethod:: Axes3D.add_collection3d -.. plot:: examples_gallery/mplot3d/plot_polys3d.py +.. plot:: gallery/mplot3d/plot_polys3d.py .. _bar3d: @@ -110,7 +110,7 @@ Bar plots ==================== .. automethod:: Axes3D.bar -.. plot:: examples_gallery/mplot3d/plot_bars3d.py +.. plot:: gallery/mplot3d/plot_bars3d.py .. _quiver3d: @@ -118,13 +118,13 @@ Quiver ==================== .. automethod:: Axes3D.quiver -.. plot:: examples_gallery/mplot3d/plot_quiver3d.py +.. plot:: gallery/mplot3d/plot_quiver3d.py .. _2dcollections3d: 2D plots in 3D ==================== -.. plot:: examples_gallery/mplot3d/plot_2dcollections3d.py +.. plot:: gallery/mplot3d/plot_2dcollections3d.py .. _text3d: @@ -132,7 +132,7 @@ Text ==================== .. automethod:: Axes3D.text -.. plot:: examples_gallery/mplot3d/plot_text3d.py +.. plot:: gallery/mplot3d/plot_text3d.py .. _3dsubplots: @@ -146,5 +146,5 @@ in the same figure. Subplotting 3D plots was added in v1.0.0. Earlier version can not do this. -.. plot:: examples_gallery/mplot3d/plot_subplot3d.py -.. plot:: examples_gallery/mplot3d/plot_mixed_subplots.py +.. plot:: gallery/mplot3d/plot_subplot3d.py +.. plot:: gallery/mplot3d/plot_mixed_subplots.py diff --git a/doc/users/prev_whats_new/whats_new_1.1.rst b/doc/users/prev_whats_new/whats_new_1.1.rst index 67a3d3560ad4..6ae61899cfd3 100644 --- a/doc/users/prev_whats_new/whats_new_1.1.rst +++ b/doc/users/prev_whats_new/whats_new_1.1.rst @@ -20,7 +20,7 @@ Kevin Davies has extended Yannick Copin's original Sankey example into a module (:ref:`api-plot_sankey_basics`, :ref:`api-plot_sankey_links`, :ref:`api-plot_sankey_rankine`). -.. plot:: examples_gallery/api/plot_sankey_rankine.py +.. plot:: gallery/api/plot_sankey_rankine.py Animation @@ -135,12 +135,12 @@ as 2D plotting, Ben Root has made several improvements to the * Ticker offset display added: -.. plot:: examples_gallery/mplot3d/plot_offset.py +.. plot:: gallery/mplot3d/plot_offset.py * :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.contourf` gains *zdir* and *offset* kwargs. You can now do this: -.. plot:: examples_gallery/mplot3d/plot_contourf3d_2.py +.. plot:: gallery/mplot3d/plot_contourf3d_2.py Numerix support removed ----------------------- diff --git a/doc/users/prev_whats_new/whats_new_1.2.rst b/doc/users/prev_whats_new/whats_new_1.2.rst index 8017cede2e67..847a0e56b154 100644 --- a/doc/users/prev_whats_new/whats_new_1.2.rst +++ b/doc/users/prev_whats_new/whats_new_1.2.rst @@ -7,6 +7,7 @@ New in matplotlib 1.2 .. contents:: Table of Contents :depth: 2 + .. note:: matplotlib 1.2 supports Python 2.6, 2.7, and 3.1 @@ -61,7 +62,7 @@ Damon McDougall added a new plotting method for the :mod:`~mpl_toolkits.mplot3d` toolkit called :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf`. -.. plot:: examples_gallery/mplot3d/plot_trisurf3d.py +.. plot:: gallery/mplot3d/plot_trisurf3d.py Control the lengths of colorbar extensions ------------------------------------------ @@ -152,7 +153,7 @@ In addition to simply plotting the streamlines of the vector field, line widths of the streamlines to a separate parameter, such as the speed or local intensity of the vector field. -.. plot:: examples_gallery/images_contours_and_fields/plot_streamplot_features.py +.. plot:: gallery/images_contours_and_fields/plot_streamplot_features.py New hist functionality diff --git a/doc/users/prev_whats_new/whats_new_1.3.rst b/doc/users/prev_whats_new/whats_new_1.3.rst index 50ef87e035b2..709ea56cb00d 100644 --- a/doc/users/prev_whats_new/whats_new_1.3.rst +++ b/doc/users/prev_whats_new/whats_new_1.3.rst @@ -91,7 +91,7 @@ before creating your plot. For really fine control, it is also possible to modify each artist's sketch parameters individually with :meth:`matplotlib.artist.Artist.set_sketch_params`. -.. plot:: examples_gallery/showcase/plot_xkcd.py +.. plot:: gallery/showcase/plot_xkcd.py Updated Axes3D.contour methods ------------------------------ @@ -100,7 +100,7 @@ Damon McDougall updated the :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.tricontourf` methods to allow 3D contour plots on abitrary unstructured user-specified triangulations. -.. plot:: examples_gallery/mplot3d/plot_tricontour3d.py +.. plot:: gallery/mplot3d/plot_tricontour3d.py New eventplot plot type ``````````````````````` diff --git a/doc/users/prev_whats_new/whats_new_1.4.rst b/doc/users/prev_whats_new/whats_new_1.4.rst index fe37fc39f9fd..f9c6b2327c54 100644 --- a/doc/users/prev_whats_new/whats_new_1.4.rst +++ b/doc/users/prev_whats_new/whats_new_1.4.rst @@ -160,7 +160,7 @@ matplotlib internals were cleaned up to support using such transforms in :class:`~matplotlib.Axes`. This transform is important for some plot types, specifically the Skew-T used in meteorology. -.. plot:: examples_gallery/api/plot_skewt.py +.. plot:: gallery/api/plot_skewt.py Support for specifying properties of wedge and text in pie charts. `````````````````````````````````````````````````````````````````` @@ -243,7 +243,7 @@ term project. This feature is documented in :func:`~mpl_toolkits.mplot3d.Axes3D. The team members are: Ryan Steve D'Souza, Victor B, xbtsw, Yang Wang, David, Caradec Bisesar and Vlad Vassilovski. -.. plot:: examples_gallery/mplot3d/plot_quiver3d.py +.. plot:: gallery/mplot3d/plot_quiver3d.py polar-plot r-tick locations ``````````````````````````` diff --git a/doc/users/prev_whats_new/whats_new_1.5.rst b/doc/users/prev_whats_new/whats_new_1.5.rst index 02fd0591b142..1361e05acab4 100644 --- a/doc/users/prev_whats_new/whats_new_1.5.rst +++ b/doc/users/prev_whats_new/whats_new_1.5.rst @@ -109,7 +109,7 @@ You can even multiply cyclers, which is like using `itertools.product()` on two or more property cycles. Remember to use parentheses if writing a multi-line `prop_cycle` parameter. -.. plot:: examples_gallery/color/plot_color_cycle.py +.. plot:: gallery/color/plot_color_cycle.py New Colormaps @@ -367,7 +367,7 @@ kwargs names is not ideal, but `Axes.fill_between` already has a This is particularly useful for plotting pre-binned histograms. -.. plot:: examples_gallery/api/plot_filled_step.py +.. plot:: gallery/api/plot_filled_step.py Square Plot diff --git a/doc/users/screenshots.rst b/doc/users/screenshots.rst index 24604626eca2..90620fb3c566 100644 --- a/doc/users/screenshots.rst +++ b/doc/users/screenshots.rst @@ -22,7 +22,7 @@ Subplot demo Multiple axes (i.e. subplots) are created with the :func:`~matplotlib.pyplot.subplot` command: -.. plot:: examples_gallery/subplots_axes_and_figures/plot_subplot.py +.. plot:: gallery/subplots_axes_and_figures/plot_subplot.py .. _screenshots_histogram_demo: @@ -32,7 +32,7 @@ Histograms The :func:`~matplotlib.pyplot.hist` command automatically generates histograms and returns the bin counts or probabilities: -.. plot:: examples_gallery/statistics/plot_histogram_features.py +.. plot:: gallery/statistics/plot_histogram_features.py .. _screenshots_path_demo: @@ -43,7 +43,7 @@ Path demo You can add arbitrary paths in matplotlib using the :mod:`matplotlib.path` module: -.. plot:: examples_gallery/shapes_and_collections/plot_path_patch.py +.. plot:: gallery/shapes_and_collections/plot_path_patch.py .. _screenshots_mplot3d_surface: @@ -54,7 +54,7 @@ The mplot3d toolkit (see :ref:`toolkit_mplot3d-tutorial` and :ref:`mplot3d-examples-index`) has support for simple 3d graphs including surface, wireframe, scatter, and bar charts. -.. plot:: examples_gallery/mplot3d/plot_surface3d.py +.. plot:: gallery/mplot3d/plot_surface3d.py Thanks to John Porter, Jonathon Taylor, Reinier Heeres, and Ben Root for the `mplot3d` toolkit. This toolkit is included with all standard matplotlib @@ -71,7 +71,7 @@ a vector field. In addition to simply plotting the streamlines, it allows you to map the colors and/or line widths of streamlines to a separate parameter, such as the speed or local intensity of the vector field. -.. plot:: examples_gallery/images_contours_and_fields/plot_streamplot_features.py +.. plot:: gallery/images_contours_and_fields/plot_streamplot_features.py This feature complements the :meth:`~matplotlib.pyplot.quiver` function for plotting vector fields. Thanks to Tom Flannaghan and Tony Yu for adding the @@ -117,7 +117,7 @@ exploding one or more wedges from the center of the pie, and a shadow effect. Take a close look at the attached code, which generates this figure in just a few lines of code. -.. plot:: examples_gallery/pie_and_polar_charts/plot_pie_features.py +.. plot:: gallery/pie_and_polar_charts/plot_pie_features.py .. _screenshots_table_demo: @@ -166,7 +166,7 @@ Fill demo The :func:`~matplotlib.pyplot.fill` command lets you plot filled curves and polygons: -.. plot:: examples_gallery/lines_bars_and_markers/plot_fill.py +.. plot:: gallery/lines_bars_and_markers/plot_fill.py Thanks to Andrew Straw for adding this function. @@ -178,7 +178,7 @@ Date demo You can plot date data with major and minor ticks and custom tick formatters for both. -.. plot:: examples_gallery/api/plot_date.py +.. plot:: gallery/api/plot_date.py See :mod:`matplotlib.ticker` and :mod:`matplotlib.dates` for details and usage. @@ -217,7 +217,7 @@ The :func:`~matplotlib.pyplot.legend` command automatically generates figure legends, with MATLAB-compatible legend placement commands. -.. plot:: examples_gallery/api/plot_legend.py +.. plot:: gallery/api/plot_legend.py Thanks to Charles Twardy for input on the legend command. @@ -278,4 +278,4 @@ XKCD-style sketch plots matplotlib supports plotting in the style of `xkcd `. -.. plot:: examples_gallery/showcase/plot_xkcd.py +.. plot:: gallery/showcase/plot_xkcd.py diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 15b56e28ea8c..9fa8d2c11be4 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -507,7 +507,7 @@ def legend(self, *args, **kwargs): Examples -------- - .. plot:: examples_gallery/api/plot_legend.py + .. plot:: gallery/api/plot_legend.py """ handlers = kwargs.get('handler_map', {}) or {} @@ -2799,7 +2799,7 @@ def errorbar(self, x, y, yerr=None, xerr=None, Examples -------- - .. plot:: examples_gallery/statistics/plot_errorbar.py + .. plot:: gallery/statistics/plot_errorbar.py """ kwargs = cbook.normalize_kwargs(kwargs, _alias_map) @@ -3271,7 +3271,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, Examples -------- - .. plot:: examples_gallery/statistics/plot_boxplot.py + .. plot:: gallery/statistics/plot_boxplot.py """ @@ -3541,7 +3541,7 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True, Examples -------- - .. plot:: examples_gallery/statistics/plot_bxp.py + .. plot:: gallery/statistics/plot_bxp.py """ # lists of artists to be output @@ -3917,7 +3917,7 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None, Examples -------- - .. plot:: examples_gallery/shapes_and_collections/plot_scatter.py + .. plot:: gallery/shapes_and_collections/plot_scatter.py """ @@ -4700,7 +4700,7 @@ def fill(self, *args, **kwargs): Examples -------- - .. plot:: examples_gallery/lines_bars_and_markers/plot_fill.py + .. plot:: gallery/lines_bars_and_markers/plot_fill.py """ @@ -6103,7 +6103,7 @@ def hist(self, x, bins=None, range=None, normed=False, weights=None, Examples -------- - .. plot:: examples_gallery/statistics/plot_histogram_features.py + .. plot:: gallery/statistics/plot_histogram_features.py """ # Avoid shadowing the builtin. @@ -6487,7 +6487,7 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None, Examples -------- - .. plot:: examples_gallery/statistics/plot_hist.py + .. plot:: gallery/statistics/plot_hist.py """ h, xedges, yedges = np.histogram2d(x, y, bins=bins, range=range, @@ -7068,7 +7068,7 @@ def cohere(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, Examples -------- - .. plot:: examples_gallery/lines_bars_and_markers/plot_cohere.py + .. plot:: gallery/lines_bars_and_markers/plot_cohere.py """ if not self._hold: self.cla() diff --git a/lib/matplotlib/path.py b/lib/matplotlib/path.py index a5a81be7fe9c..59749ae345ca 100644 --- a/lib/matplotlib/path.py +++ b/lib/matplotlib/path.py @@ -317,7 +317,7 @@ def make_compound_path_from_polys(cls, XY): numsides x 2) numpy array of vertices. Return object is a :class:`Path` - .. plot:: examples_gallery/api/plot_histogram_path.py + .. plot:: gallery/api/plot_histogram_path.py """ diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index 8a13fec4a10c..a1a5c0fd709c 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -1037,12 +1037,12 @@ def subplot(*args, **kwargs): For additional information on :func:`axes` and :func:`subplot` keyword arguments. - :file:`examples_gallery/pie_and_polar_charts/plot_polar_scatter.py` + :file:`gallery/pie_and_polar_charts/plot_polar_scatter.py` For an example **Example:** - .. plot:: examples_gallery/subplots_axes_and_figures/plot_subplot.py + .. plot:: gallery/subplots_axes_and_figures/plot_subplot.py """ # if subplot called without arguments, create subplot(1,1,1) diff --git a/lib/matplotlib/sankey.py b/lib/matplotlib/sankey.py index ed59d6cf803e..433e1fd33ab0 100644 --- a/lib/matplotlib/sankey.py +++ b/lib/matplotlib/sankey.py @@ -118,7 +118,7 @@ def __init__(self, ax=None, scale=1.0, unit='', format='%G', gap=0.25, **Examples:** - .. plot:: examples_gallery/api/plot_sankey_basics.py + .. plot:: gallery/api/plot_sankey_basics.py """ # Check the arguments. if gap < 0: diff --git a/lib/mpl_toolkits/mplot3d/axes3d.py b/lib/mpl_toolkits/mplot3d/axes3d.py index 8af1b4d492dd..2fda24b1f909 100644 --- a/lib/mpl_toolkits/mplot3d/axes3d.py +++ b/lib/mpl_toolkits/mplot3d/axes3d.py @@ -1911,8 +1911,8 @@ def plot_trisurf(self, *args, **kwargs): **Examples:** - .. plot:: examples_gallery/mplot3d/plot_trisurf3d.py - .. plot:: examples_gallery/mplot3d/plot_trisurf3d_2.py + .. plot:: gallery/mplot3d/plot_trisurf3d.py + .. plot:: gallery/mplot3d/plot_trisurf3d_2.py .. versionadded:: 1.2.0 This plotting function was added for the v1.2.0 release. From 283f687238cd3f45ff7d86604045164062d0fb9a Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Mon, 10 Apr 2017 22:12:46 -0700 Subject: [PATCH 24/27] Remove plot_ suffix. --- examples/api/{plot_affine_image.py => affine_image.py} | 0 examples/api/{plot_agg_oo.py => agg_oo.py} | 0 examples/api/{plot_barchart.py => barchart.py} | 0 examples/api/{plot_bbox_intersect.py => bbox_intersect.py} | 0 examples/api/{plot_collections.py => collections.py} | 0 examples/api/{plot_colorbar_basics.py => colorbar_basics.py} | 0 examples/api/{plot_colorbar_only.py => colorbar_only.py} | 0 examples/api/{plot_compound_path.py => compound_path.py} | 0 ..._custom_projection_example.py => custom_projection_example.py} | 0 .../api/{plot_custom_scale_example.py => custom_scale_example.py} | 0 examples/api/{plot_date.py => date.py} | 0 .../api/{plot_date_index_formatter.py => date_index_formatter.py} | 0 examples/api/{plot_donut.py => donut.py} | 0 .../{plot_engineering_formatter.py => engineering_formatter.py} | 0 examples/api/{plot_filled_step.py => filled_step.py} | 0 examples/api/{plot_font_family_rc.py => font_family_rc.py} | 0 examples/api/{plot_font_file.py => font_file.py} | 0 examples/api/{plot_histogram_path.py => histogram_path.py} | 0 examples/api/{plot_image_zcoord.py => image_zcoord.py} | 0 examples/api/{plot_joinstyle.py => joinstyle.py} | 0 examples/api/{plot_legend.py => legend.py} | 0 examples/api/{plot_line_with_text.py => line_with_text.py} | 0 examples/api/{plot_logos2.py => logos2.py} | 0 examples/api/{plot_mathtext_asarray.py => mathtext_asarray.py} | 0 examples/api/{plot_patch_collection.py => patch_collection.py} | 0 examples/api/{plot_power_norm.py => power_norm.py} | 0 examples/api/{plot_quad_bezier.py => quad_bezier.py} | 0 examples/api/{plot_radar_chart.py => radar_chart.py} | 0 examples/api/{plot_sankey_basics.py => sankey_basics.py} | 0 examples/api/{plot_sankey_links.py => sankey_links.py} | 0 examples/api/{plot_sankey_rankine.py => sankey_rankine.py} | 0 examples/api/{plot_scatter_piecharts.py => scatter_piecharts.py} | 0 examples/api/{plot_skewt.py => skewt.py} | 0 examples/api/{plot_span_regions.py => span_regions.py} | 0 examples/api/{plot_two_scales.py => two_scales.py} | 0 examples/api/{plot_unicode_minus.py => unicode_minus.py} | 0 examples/api/{plot_watermark_image.py => watermark_image.py} | 0 examples/api/{plot_watermark_text.py => watermark_text.py} | 0 examples/color/{plot_color_cycle.py => color_cycle.py} | 0 .../color/{plot_color_cycle_default.py => color_cycle_default.py} | 0 .../color/{plot_colormaps_reference.py => colormaps_reference.py} | 0 examples/color/{plot_named_colors.py => named_colors.py} | 0 examples/frontpage/{plot_3D.py => 3D.py} | 0 examples/frontpage/{plot_contour.py => contour.py} | 0 examples/frontpage/{plot_histogram.py => histogram.py} | 0 examples/frontpage/{plot_membrane.py => membrane.py} | 0 .../{plot_contourf_log.py => contourf_log.py} | 0 .../{plot_image_clip_path.py => image_clip_path.py} | 0 .../{plot_image_demo.py => image_demo.py} | 0 .../{plot_interpolation_methods.py => interpolation_methods.py} | 0 .../{plot_pcolormesh_levels.py => pcolormesh_levels.py} | 0 .../{plot_streamplot_features.py => streamplot_features.py} | 0 .../{plot_streamplot_masking.py => streamplot_masking.py} | 0 ...plot_streamplot_start_points.py => streamplot_start_points.py} | 0 examples/lines_bars_and_markers/{plot_barh.py => barh.py} | 0 examples/lines_bars_and_markers/{plot_cohere.py => cohere.py} | 0 examples/lines_bars_and_markers/{plot_fill.py => fill.py} | 0 .../{plot_line_demo_dash_control.py => line_demo_dash_control.py} | 0 .../{plot_line_styles_reference.py => line_styles_reference.py} | 0 .../lines_bars_and_markers/{plot_linestyles.py => linestyles.py} | 0 ...arker_fillstyle_reference.py => marker_fillstyle_reference.py} | 0 .../{plot_marker_reference.py => marker_reference.py} | 0 .../{plot_multicolored_line.py => multicolored_line.py} | 0 .../{plot_scatter_with_legend.py => scatter_with_legend.py} | 0 examples/mplot3d/{plot_2dcollections3d.py => 2dcollections3d.py} | 0 examples/mplot3d/{plot_3d_bars.py => 3d_bars.py} | 0 examples/mplot3d/{plot_bars3d.py => bars3d.py} | 0 examples/mplot3d/{plot_contour3d.py => contour3d.py} | 0 examples/mplot3d/{plot_contour3d_2.py => contour3d_2.py} | 0 examples/mplot3d/{plot_contour3d_3.py => contour3d_3.py} | 0 examples/mplot3d/{plot_contourf3d.py => contourf3d.py} | 0 examples/mplot3d/{plot_contourf3d_2.py => contourf3d_2.py} | 0 ...ot_custom_shaded_3d_surface.py => custom_shaded_3d_surface.py} | 0 examples/mplot3d/{plot_hist3d.py => hist3d.py} | 0 examples/mplot3d/{plot_lines3d.py => lines3d.py} | 0 .../mplot3d/{plot_lorenz_attractor.py => lorenz_attractor.py} | 0 examples/mplot3d/{plot_mixed_subplots.py => mixed_subplots.py} | 0 examples/mplot3d/{plot_offset.py => offset.py} | 0 examples/mplot3d/{plot_pathpatch3d.py => pathpatch3d.py} | 0 examples/mplot3d/{plot_polys3d.py => polys3d.py} | 0 examples/mplot3d/{plot_quiver3d.py => quiver3d.py} | 0 examples/mplot3d/{plot_rotate_axes3d.py => rotate_axes3d.py} | 0 examples/mplot3d/{plot_scatter3d.py => scatter3d.py} | 0 examples/mplot3d/{plot_subplot3d.py => subplot3d.py} | 0 examples/mplot3d/{plot_surface3d.py => surface3d.py} | 0 examples/mplot3d/{plot_surface3d_2.py => surface3d_2.py} | 0 examples/mplot3d/{plot_surface3d_3.py => surface3d_3.py} | 0 .../mplot3d/{plot_surface3d_radial.py => surface3d_radial.py} | 0 examples/mplot3d/{plot_text3d.py => text3d.py} | 0 examples/mplot3d/{plot_tricontour3d.py => tricontour3d.py} | 0 examples/mplot3d/{plot_tricontourf3d.py => tricontourf3d.py} | 0 examples/mplot3d/{plot_trisurf3d.py => trisurf3d.py} | 0 examples/mplot3d/{plot_trisurf3d_2.py => trisurf3d_2.py} | 0 examples/mplot3d/{plot_wire3d.py => wire3d.py} | 0 .../mplot3d/{plot_wire3d_animation.py => wire3d_animation.py} | 0 .../mplot3d/{plot_wire3d_zero_stride.py => wire3d_zero_stride.py} | 0 .../{plot_pie_features.py => pie_features.py} | 0 examples/pie_and_polar_charts/{plot_polar_bar.py => polar_bar.py} | 0 .../{plot_polar_scatter.py => polar_scatter.py} | 0 .../{plot_artist_reference.py => artist_reference.py} | 0 .../shapes_and_collections/{plot_path_patch.py => path_patch.py} | 0 examples/shapes_and_collections/{plot_scatter.py => scatter.py} | 0 examples/showcase/{plot_anatomy.py => anatomy.py} | 0 ...helors_degrees_by_gender.py => bachelors_degrees_by_gender.py} | 0 examples/showcase/{plot_firefox.py => firefox.py} | 0 examples/showcase/{plot_integral.py => integral.py} | 0 examples/showcase/{plot_mandelbrot.py => mandelbrot.py} | 0 examples/showcase/{plot_xkcd.py => xkcd.py} | 0 examples/statistics/{plot_boxplot.py => boxplot.py} | 0 examples/statistics/{plot_boxplot_color.py => boxplot_color.py} | 0 .../{plot_boxplot_vs_violin.py => boxplot_vs_violin.py} | 0 examples/statistics/{plot_bxp.py => bxp.py} | 0 .../{plot_customized_violin.py => customized_violin.py} | 0 examples/statistics/{plot_errorbar.py => errorbar.py} | 0 .../{plot_errorbar_features.py => errorbar_features.py} | 0 .../statistics/{plot_errorbar_limits.py => errorbar_limits.py} | 0 .../{plot_errorbars_and_boxes.py => errorbars_and_boxes.py} | 0 examples/statistics/{plot_hist.py => hist.py} | 0 .../{plot_histogram_cumulative.py => histogram_cumulative.py} | 0 .../{plot_histogram_features.py => histogram_features.py} | 0 .../{plot_histogram_histtypes.py => histogram_histtypes.py} | 0 .../{plot_histogram_multihist.py => histogram_multihist.py} | 0 ...ograms_side_by_side.py => multiple_histograms_side_by_side.py} | 0 examples/statistics/{plot_violinplot.py => violinplot.py} | 0 examples/style_sheets/{plot_bmh.py => bmh.py} | 0 .../style_sheets/{plot_dark_background.py => dark_background.py} | 0 .../style_sheets/{plot_fivethirtyeight.py => fivethirtyeight.py} | 0 examples/style_sheets/{plot_ggplot.py => ggplot.py} | 0 examples/style_sheets/{plot_grayscale.py => grayscale.py} | 0 .../{plot_style_sheets_reference.py => style_sheets_reference.py} | 0 .../{plot_equal_aspect_ratio.py => equal_aspect_ratio.py} | 0 ..._fahrenheit_celsius_scales.py => fahrenheit_celsius_scales.py} | 0 .../{plot_ganged_plots.py => ganged_plots.py} | 0 .../subplots_axes_and_figures/{plot_subplot.py => subplot.py} | 0 .../{plot_accented_text.py => accented_text.py} | 0 .../text_labels_and_annotations/{plot_autowrap.py => autowrap.py} | 0 .../{plot_rainbow_text.py => rainbow_text.py} | 0 .../{plot_text_alignment.py => text_alignment.py} | 0 .../{plot_text_fontdict.py => text_fontdict.py} | 0 .../{plot_text_rotation.py => text_rotation.py} | 0 .../{plot_scalarformatter.py => scalarformatter.py} | 0 examples/ticks_and_spines/{plot_spines.py => spines.py} | 0 .../ticks_and_spines/{plot_spines_bounds.py => spines_bounds.py} | 0 .../{plot_spines_dropped.py => spines_dropped.py} | 0 .../{plot_tick-formatters.py => tick-formatters.py} | 0 .../ticks_and_spines/{plot_tick-locators.py => tick-locators.py} | 0 ...plot_tick_labels_from_values.py => tick_labels_from_values.py} | 0 .../{plot_ticklabels_rotation.py => ticklabels_rotation.py} | 0 148 files changed, 0 insertions(+), 0 deletions(-) rename examples/api/{plot_affine_image.py => affine_image.py} (100%) rename examples/api/{plot_agg_oo.py => agg_oo.py} (100%) rename examples/api/{plot_barchart.py => barchart.py} (100%) rename examples/api/{plot_bbox_intersect.py => bbox_intersect.py} (100%) rename examples/api/{plot_collections.py => collections.py} (100%) rename examples/api/{plot_colorbar_basics.py => colorbar_basics.py} (100%) rename examples/api/{plot_colorbar_only.py => colorbar_only.py} (100%) rename examples/api/{plot_compound_path.py => compound_path.py} (100%) rename examples/api/{plot_custom_projection_example.py => custom_projection_example.py} (100%) rename examples/api/{plot_custom_scale_example.py => custom_scale_example.py} (100%) rename examples/api/{plot_date.py => date.py} (100%) rename examples/api/{plot_date_index_formatter.py => date_index_formatter.py} (100%) rename examples/api/{plot_donut.py => donut.py} (100%) rename examples/api/{plot_engineering_formatter.py => engineering_formatter.py} (100%) rename examples/api/{plot_filled_step.py => filled_step.py} (100%) rename examples/api/{plot_font_family_rc.py => font_family_rc.py} (100%) rename examples/api/{plot_font_file.py => font_file.py} (100%) rename examples/api/{plot_histogram_path.py => histogram_path.py} (100%) rename examples/api/{plot_image_zcoord.py => image_zcoord.py} (100%) rename examples/api/{plot_joinstyle.py => joinstyle.py} (100%) rename examples/api/{plot_legend.py => legend.py} (100%) rename examples/api/{plot_line_with_text.py => line_with_text.py} (100%) rename examples/api/{plot_logos2.py => logos2.py} (100%) rename examples/api/{plot_mathtext_asarray.py => mathtext_asarray.py} (100%) rename examples/api/{plot_patch_collection.py => patch_collection.py} (100%) rename examples/api/{plot_power_norm.py => power_norm.py} (100%) rename examples/api/{plot_quad_bezier.py => quad_bezier.py} (100%) rename examples/api/{plot_radar_chart.py => radar_chart.py} (100%) rename examples/api/{plot_sankey_basics.py => sankey_basics.py} (100%) rename examples/api/{plot_sankey_links.py => sankey_links.py} (100%) rename examples/api/{plot_sankey_rankine.py => sankey_rankine.py} (100%) rename examples/api/{plot_scatter_piecharts.py => scatter_piecharts.py} (100%) rename examples/api/{plot_skewt.py => skewt.py} (100%) rename examples/api/{plot_span_regions.py => span_regions.py} (100%) rename examples/api/{plot_two_scales.py => two_scales.py} (100%) rename examples/api/{plot_unicode_minus.py => unicode_minus.py} (100%) rename examples/api/{plot_watermark_image.py => watermark_image.py} (100%) rename examples/api/{plot_watermark_text.py => watermark_text.py} (100%) rename examples/color/{plot_color_cycle.py => color_cycle.py} (100%) rename examples/color/{plot_color_cycle_default.py => color_cycle_default.py} (100%) rename examples/color/{plot_colormaps_reference.py => colormaps_reference.py} (100%) rename examples/color/{plot_named_colors.py => named_colors.py} (100%) rename examples/frontpage/{plot_3D.py => 3D.py} (100%) rename examples/frontpage/{plot_contour.py => contour.py} (100%) rename examples/frontpage/{plot_histogram.py => histogram.py} (100%) rename examples/frontpage/{plot_membrane.py => membrane.py} (100%) rename examples/images_contours_and_fields/{plot_contourf_log.py => contourf_log.py} (100%) rename examples/images_contours_and_fields/{plot_image_clip_path.py => image_clip_path.py} (100%) rename examples/images_contours_and_fields/{plot_image_demo.py => image_demo.py} (100%) rename examples/images_contours_and_fields/{plot_interpolation_methods.py => interpolation_methods.py} (100%) rename examples/images_contours_and_fields/{plot_pcolormesh_levels.py => pcolormesh_levels.py} (100%) rename examples/images_contours_and_fields/{plot_streamplot_features.py => streamplot_features.py} (100%) rename examples/images_contours_and_fields/{plot_streamplot_masking.py => streamplot_masking.py} (100%) rename examples/images_contours_and_fields/{plot_streamplot_start_points.py => streamplot_start_points.py} (100%) rename examples/lines_bars_and_markers/{plot_barh.py => barh.py} (100%) rename examples/lines_bars_and_markers/{plot_cohere.py => cohere.py} (100%) rename examples/lines_bars_and_markers/{plot_fill.py => fill.py} (100%) rename examples/lines_bars_and_markers/{plot_line_demo_dash_control.py => line_demo_dash_control.py} (100%) rename examples/lines_bars_and_markers/{plot_line_styles_reference.py => line_styles_reference.py} (100%) rename examples/lines_bars_and_markers/{plot_linestyles.py => linestyles.py} (100%) rename examples/lines_bars_and_markers/{plot_marker_fillstyle_reference.py => marker_fillstyle_reference.py} (100%) rename examples/lines_bars_and_markers/{plot_marker_reference.py => marker_reference.py} (100%) rename examples/lines_bars_and_markers/{plot_multicolored_line.py => multicolored_line.py} (100%) rename examples/lines_bars_and_markers/{plot_scatter_with_legend.py => scatter_with_legend.py} (100%) rename examples/mplot3d/{plot_2dcollections3d.py => 2dcollections3d.py} (100%) rename examples/mplot3d/{plot_3d_bars.py => 3d_bars.py} (100%) rename examples/mplot3d/{plot_bars3d.py => bars3d.py} (100%) rename examples/mplot3d/{plot_contour3d.py => contour3d.py} (100%) rename examples/mplot3d/{plot_contour3d_2.py => contour3d_2.py} (100%) rename examples/mplot3d/{plot_contour3d_3.py => contour3d_3.py} (100%) rename examples/mplot3d/{plot_contourf3d.py => contourf3d.py} (100%) rename examples/mplot3d/{plot_contourf3d_2.py => contourf3d_2.py} (100%) rename examples/mplot3d/{plot_custom_shaded_3d_surface.py => custom_shaded_3d_surface.py} (100%) rename examples/mplot3d/{plot_hist3d.py => hist3d.py} (100%) rename examples/mplot3d/{plot_lines3d.py => lines3d.py} (100%) rename examples/mplot3d/{plot_lorenz_attractor.py => lorenz_attractor.py} (100%) rename examples/mplot3d/{plot_mixed_subplots.py => mixed_subplots.py} (100%) rename examples/mplot3d/{plot_offset.py => offset.py} (100%) rename examples/mplot3d/{plot_pathpatch3d.py => pathpatch3d.py} (100%) rename examples/mplot3d/{plot_polys3d.py => polys3d.py} (100%) rename examples/mplot3d/{plot_quiver3d.py => quiver3d.py} (100%) rename examples/mplot3d/{plot_rotate_axes3d.py => rotate_axes3d.py} (100%) rename examples/mplot3d/{plot_scatter3d.py => scatter3d.py} (100%) rename examples/mplot3d/{plot_subplot3d.py => subplot3d.py} (100%) rename examples/mplot3d/{plot_surface3d.py => surface3d.py} (100%) rename examples/mplot3d/{plot_surface3d_2.py => surface3d_2.py} (100%) rename examples/mplot3d/{plot_surface3d_3.py => surface3d_3.py} (100%) rename examples/mplot3d/{plot_surface3d_radial.py => surface3d_radial.py} (100%) rename examples/mplot3d/{plot_text3d.py => text3d.py} (100%) rename examples/mplot3d/{plot_tricontour3d.py => tricontour3d.py} (100%) rename examples/mplot3d/{plot_tricontourf3d.py => tricontourf3d.py} (100%) rename examples/mplot3d/{plot_trisurf3d.py => trisurf3d.py} (100%) rename examples/mplot3d/{plot_trisurf3d_2.py => trisurf3d_2.py} (100%) rename examples/mplot3d/{plot_wire3d.py => wire3d.py} (100%) rename examples/mplot3d/{plot_wire3d_animation.py => wire3d_animation.py} (100%) rename examples/mplot3d/{plot_wire3d_zero_stride.py => wire3d_zero_stride.py} (100%) rename examples/pie_and_polar_charts/{plot_pie_features.py => pie_features.py} (100%) rename examples/pie_and_polar_charts/{plot_polar_bar.py => polar_bar.py} (100%) rename examples/pie_and_polar_charts/{plot_polar_scatter.py => polar_scatter.py} (100%) rename examples/shapes_and_collections/{plot_artist_reference.py => artist_reference.py} (100%) rename examples/shapes_and_collections/{plot_path_patch.py => path_patch.py} (100%) rename examples/shapes_and_collections/{plot_scatter.py => scatter.py} (100%) rename examples/showcase/{plot_anatomy.py => anatomy.py} (100%) rename examples/showcase/{plot_bachelors_degrees_by_gender.py => bachelors_degrees_by_gender.py} (100%) rename examples/showcase/{plot_firefox.py => firefox.py} (100%) rename examples/showcase/{plot_integral.py => integral.py} (100%) rename examples/showcase/{plot_mandelbrot.py => mandelbrot.py} (100%) rename examples/showcase/{plot_xkcd.py => xkcd.py} (100%) rename examples/statistics/{plot_boxplot.py => boxplot.py} (100%) rename examples/statistics/{plot_boxplot_color.py => boxplot_color.py} (100%) rename examples/statistics/{plot_boxplot_vs_violin.py => boxplot_vs_violin.py} (100%) rename examples/statistics/{plot_bxp.py => bxp.py} (100%) rename examples/statistics/{plot_customized_violin.py => customized_violin.py} (100%) rename examples/statistics/{plot_errorbar.py => errorbar.py} (100%) rename examples/statistics/{plot_errorbar_features.py => errorbar_features.py} (100%) rename examples/statistics/{plot_errorbar_limits.py => errorbar_limits.py} (100%) rename examples/statistics/{plot_errorbars_and_boxes.py => errorbars_and_boxes.py} (100%) rename examples/statistics/{plot_hist.py => hist.py} (100%) rename examples/statistics/{plot_histogram_cumulative.py => histogram_cumulative.py} (100%) rename examples/statistics/{plot_histogram_features.py => histogram_features.py} (100%) rename examples/statistics/{plot_histogram_histtypes.py => histogram_histtypes.py} (100%) rename examples/statistics/{plot_histogram_multihist.py => histogram_multihist.py} (100%) rename examples/statistics/{plot_multiple_histograms_side_by_side.py => multiple_histograms_side_by_side.py} (100%) rename examples/statistics/{plot_violinplot.py => violinplot.py} (100%) rename examples/style_sheets/{plot_bmh.py => bmh.py} (100%) rename examples/style_sheets/{plot_dark_background.py => dark_background.py} (100%) rename examples/style_sheets/{plot_fivethirtyeight.py => fivethirtyeight.py} (100%) rename examples/style_sheets/{plot_ggplot.py => ggplot.py} (100%) rename examples/style_sheets/{plot_grayscale.py => grayscale.py} (100%) rename examples/style_sheets/{plot_style_sheets_reference.py => style_sheets_reference.py} (100%) rename examples/subplots_axes_and_figures/{plot_equal_aspect_ratio.py => equal_aspect_ratio.py} (100%) rename examples/subplots_axes_and_figures/{plot_fahrenheit_celsius_scales.py => fahrenheit_celsius_scales.py} (100%) rename examples/subplots_axes_and_figures/{plot_ganged_plots.py => ganged_plots.py} (100%) rename examples/subplots_axes_and_figures/{plot_subplot.py => subplot.py} (100%) rename examples/text_labels_and_annotations/{plot_accented_text.py => accented_text.py} (100%) rename examples/text_labels_and_annotations/{plot_autowrap.py => autowrap.py} (100%) rename examples/text_labels_and_annotations/{plot_rainbow_text.py => rainbow_text.py} (100%) rename examples/text_labels_and_annotations/{plot_text_alignment.py => text_alignment.py} (100%) rename examples/text_labels_and_annotations/{plot_text_fontdict.py => text_fontdict.py} (100%) rename examples/text_labels_and_annotations/{plot_text_rotation.py => text_rotation.py} (100%) rename examples/ticks_and_spines/{plot_scalarformatter.py => scalarformatter.py} (100%) rename examples/ticks_and_spines/{plot_spines.py => spines.py} (100%) rename examples/ticks_and_spines/{plot_spines_bounds.py => spines_bounds.py} (100%) rename examples/ticks_and_spines/{plot_spines_dropped.py => spines_dropped.py} (100%) rename examples/ticks_and_spines/{plot_tick-formatters.py => tick-formatters.py} (100%) rename examples/ticks_and_spines/{plot_tick-locators.py => tick-locators.py} (100%) rename examples/ticks_and_spines/{plot_tick_labels_from_values.py => tick_labels_from_values.py} (100%) rename examples/ticks_and_spines/{plot_ticklabels_rotation.py => ticklabels_rotation.py} (100%) diff --git a/examples/api/plot_affine_image.py b/examples/api/affine_image.py similarity index 100% rename from examples/api/plot_affine_image.py rename to examples/api/affine_image.py diff --git a/examples/api/plot_agg_oo.py b/examples/api/agg_oo.py similarity index 100% rename from examples/api/plot_agg_oo.py rename to examples/api/agg_oo.py diff --git a/examples/api/plot_barchart.py b/examples/api/barchart.py similarity index 100% rename from examples/api/plot_barchart.py rename to examples/api/barchart.py diff --git a/examples/api/plot_bbox_intersect.py b/examples/api/bbox_intersect.py similarity index 100% rename from examples/api/plot_bbox_intersect.py rename to examples/api/bbox_intersect.py diff --git a/examples/api/plot_collections.py b/examples/api/collections.py similarity index 100% rename from examples/api/plot_collections.py rename to examples/api/collections.py diff --git a/examples/api/plot_colorbar_basics.py b/examples/api/colorbar_basics.py similarity index 100% rename from examples/api/plot_colorbar_basics.py rename to examples/api/colorbar_basics.py diff --git a/examples/api/plot_colorbar_only.py b/examples/api/colorbar_only.py similarity index 100% rename from examples/api/plot_colorbar_only.py rename to examples/api/colorbar_only.py diff --git a/examples/api/plot_compound_path.py b/examples/api/compound_path.py similarity index 100% rename from examples/api/plot_compound_path.py rename to examples/api/compound_path.py diff --git a/examples/api/plot_custom_projection_example.py b/examples/api/custom_projection_example.py similarity index 100% rename from examples/api/plot_custom_projection_example.py rename to examples/api/custom_projection_example.py diff --git a/examples/api/plot_custom_scale_example.py b/examples/api/custom_scale_example.py similarity index 100% rename from examples/api/plot_custom_scale_example.py rename to examples/api/custom_scale_example.py diff --git a/examples/api/plot_date.py b/examples/api/date.py similarity index 100% rename from examples/api/plot_date.py rename to examples/api/date.py diff --git a/examples/api/plot_date_index_formatter.py b/examples/api/date_index_formatter.py similarity index 100% rename from examples/api/plot_date_index_formatter.py rename to examples/api/date_index_formatter.py diff --git a/examples/api/plot_donut.py b/examples/api/donut.py similarity index 100% rename from examples/api/plot_donut.py rename to examples/api/donut.py diff --git a/examples/api/plot_engineering_formatter.py b/examples/api/engineering_formatter.py similarity index 100% rename from examples/api/plot_engineering_formatter.py rename to examples/api/engineering_formatter.py diff --git a/examples/api/plot_filled_step.py b/examples/api/filled_step.py similarity index 100% rename from examples/api/plot_filled_step.py rename to examples/api/filled_step.py diff --git a/examples/api/plot_font_family_rc.py b/examples/api/font_family_rc.py similarity index 100% rename from examples/api/plot_font_family_rc.py rename to examples/api/font_family_rc.py diff --git a/examples/api/plot_font_file.py b/examples/api/font_file.py similarity index 100% rename from examples/api/plot_font_file.py rename to examples/api/font_file.py diff --git a/examples/api/plot_histogram_path.py b/examples/api/histogram_path.py similarity index 100% rename from examples/api/plot_histogram_path.py rename to examples/api/histogram_path.py diff --git a/examples/api/plot_image_zcoord.py b/examples/api/image_zcoord.py similarity index 100% rename from examples/api/plot_image_zcoord.py rename to examples/api/image_zcoord.py diff --git a/examples/api/plot_joinstyle.py b/examples/api/joinstyle.py similarity index 100% rename from examples/api/plot_joinstyle.py rename to examples/api/joinstyle.py diff --git a/examples/api/plot_legend.py b/examples/api/legend.py similarity index 100% rename from examples/api/plot_legend.py rename to examples/api/legend.py diff --git a/examples/api/plot_line_with_text.py b/examples/api/line_with_text.py similarity index 100% rename from examples/api/plot_line_with_text.py rename to examples/api/line_with_text.py diff --git a/examples/api/plot_logos2.py b/examples/api/logos2.py similarity index 100% rename from examples/api/plot_logos2.py rename to examples/api/logos2.py diff --git a/examples/api/plot_mathtext_asarray.py b/examples/api/mathtext_asarray.py similarity index 100% rename from examples/api/plot_mathtext_asarray.py rename to examples/api/mathtext_asarray.py diff --git a/examples/api/plot_patch_collection.py b/examples/api/patch_collection.py similarity index 100% rename from examples/api/plot_patch_collection.py rename to examples/api/patch_collection.py diff --git a/examples/api/plot_power_norm.py b/examples/api/power_norm.py similarity index 100% rename from examples/api/plot_power_norm.py rename to examples/api/power_norm.py diff --git a/examples/api/plot_quad_bezier.py b/examples/api/quad_bezier.py similarity index 100% rename from examples/api/plot_quad_bezier.py rename to examples/api/quad_bezier.py diff --git a/examples/api/plot_radar_chart.py b/examples/api/radar_chart.py similarity index 100% rename from examples/api/plot_radar_chart.py rename to examples/api/radar_chart.py diff --git a/examples/api/plot_sankey_basics.py b/examples/api/sankey_basics.py similarity index 100% rename from examples/api/plot_sankey_basics.py rename to examples/api/sankey_basics.py diff --git a/examples/api/plot_sankey_links.py b/examples/api/sankey_links.py similarity index 100% rename from examples/api/plot_sankey_links.py rename to examples/api/sankey_links.py diff --git a/examples/api/plot_sankey_rankine.py b/examples/api/sankey_rankine.py similarity index 100% rename from examples/api/plot_sankey_rankine.py rename to examples/api/sankey_rankine.py diff --git a/examples/api/plot_scatter_piecharts.py b/examples/api/scatter_piecharts.py similarity index 100% rename from examples/api/plot_scatter_piecharts.py rename to examples/api/scatter_piecharts.py diff --git a/examples/api/plot_skewt.py b/examples/api/skewt.py similarity index 100% rename from examples/api/plot_skewt.py rename to examples/api/skewt.py diff --git a/examples/api/plot_span_regions.py b/examples/api/span_regions.py similarity index 100% rename from examples/api/plot_span_regions.py rename to examples/api/span_regions.py diff --git a/examples/api/plot_two_scales.py b/examples/api/two_scales.py similarity index 100% rename from examples/api/plot_two_scales.py rename to examples/api/two_scales.py diff --git a/examples/api/plot_unicode_minus.py b/examples/api/unicode_minus.py similarity index 100% rename from examples/api/plot_unicode_minus.py rename to examples/api/unicode_minus.py diff --git a/examples/api/plot_watermark_image.py b/examples/api/watermark_image.py similarity index 100% rename from examples/api/plot_watermark_image.py rename to examples/api/watermark_image.py diff --git a/examples/api/plot_watermark_text.py b/examples/api/watermark_text.py similarity index 100% rename from examples/api/plot_watermark_text.py rename to examples/api/watermark_text.py diff --git a/examples/color/plot_color_cycle.py b/examples/color/color_cycle.py similarity index 100% rename from examples/color/plot_color_cycle.py rename to examples/color/color_cycle.py diff --git a/examples/color/plot_color_cycle_default.py b/examples/color/color_cycle_default.py similarity index 100% rename from examples/color/plot_color_cycle_default.py rename to examples/color/color_cycle_default.py diff --git a/examples/color/plot_colormaps_reference.py b/examples/color/colormaps_reference.py similarity index 100% rename from examples/color/plot_colormaps_reference.py rename to examples/color/colormaps_reference.py diff --git a/examples/color/plot_named_colors.py b/examples/color/named_colors.py similarity index 100% rename from examples/color/plot_named_colors.py rename to examples/color/named_colors.py diff --git a/examples/frontpage/plot_3D.py b/examples/frontpage/3D.py similarity index 100% rename from examples/frontpage/plot_3D.py rename to examples/frontpage/3D.py diff --git a/examples/frontpage/plot_contour.py b/examples/frontpage/contour.py similarity index 100% rename from examples/frontpage/plot_contour.py rename to examples/frontpage/contour.py diff --git a/examples/frontpage/plot_histogram.py b/examples/frontpage/histogram.py similarity index 100% rename from examples/frontpage/plot_histogram.py rename to examples/frontpage/histogram.py diff --git a/examples/frontpage/plot_membrane.py b/examples/frontpage/membrane.py similarity index 100% rename from examples/frontpage/plot_membrane.py rename to examples/frontpage/membrane.py diff --git a/examples/images_contours_and_fields/plot_contourf_log.py b/examples/images_contours_and_fields/contourf_log.py similarity index 100% rename from examples/images_contours_and_fields/plot_contourf_log.py rename to examples/images_contours_and_fields/contourf_log.py diff --git a/examples/images_contours_and_fields/plot_image_clip_path.py b/examples/images_contours_and_fields/image_clip_path.py similarity index 100% rename from examples/images_contours_and_fields/plot_image_clip_path.py rename to examples/images_contours_and_fields/image_clip_path.py diff --git a/examples/images_contours_and_fields/plot_image_demo.py b/examples/images_contours_and_fields/image_demo.py similarity index 100% rename from examples/images_contours_and_fields/plot_image_demo.py rename to examples/images_contours_and_fields/image_demo.py diff --git a/examples/images_contours_and_fields/plot_interpolation_methods.py b/examples/images_contours_and_fields/interpolation_methods.py similarity index 100% rename from examples/images_contours_and_fields/plot_interpolation_methods.py rename to examples/images_contours_and_fields/interpolation_methods.py diff --git a/examples/images_contours_and_fields/plot_pcolormesh_levels.py b/examples/images_contours_and_fields/pcolormesh_levels.py similarity index 100% rename from examples/images_contours_and_fields/plot_pcolormesh_levels.py rename to examples/images_contours_and_fields/pcolormesh_levels.py diff --git a/examples/images_contours_and_fields/plot_streamplot_features.py b/examples/images_contours_and_fields/streamplot_features.py similarity index 100% rename from examples/images_contours_and_fields/plot_streamplot_features.py rename to examples/images_contours_and_fields/streamplot_features.py diff --git a/examples/images_contours_and_fields/plot_streamplot_masking.py b/examples/images_contours_and_fields/streamplot_masking.py similarity index 100% rename from examples/images_contours_and_fields/plot_streamplot_masking.py rename to examples/images_contours_and_fields/streamplot_masking.py diff --git a/examples/images_contours_and_fields/plot_streamplot_start_points.py b/examples/images_contours_and_fields/streamplot_start_points.py similarity index 100% rename from examples/images_contours_and_fields/plot_streamplot_start_points.py rename to examples/images_contours_and_fields/streamplot_start_points.py diff --git a/examples/lines_bars_and_markers/plot_barh.py b/examples/lines_bars_and_markers/barh.py similarity index 100% rename from examples/lines_bars_and_markers/plot_barh.py rename to examples/lines_bars_and_markers/barh.py diff --git a/examples/lines_bars_and_markers/plot_cohere.py b/examples/lines_bars_and_markers/cohere.py similarity index 100% rename from examples/lines_bars_and_markers/plot_cohere.py rename to examples/lines_bars_and_markers/cohere.py diff --git a/examples/lines_bars_and_markers/plot_fill.py b/examples/lines_bars_and_markers/fill.py similarity index 100% rename from examples/lines_bars_and_markers/plot_fill.py rename to examples/lines_bars_and_markers/fill.py diff --git a/examples/lines_bars_and_markers/plot_line_demo_dash_control.py b/examples/lines_bars_and_markers/line_demo_dash_control.py similarity index 100% rename from examples/lines_bars_and_markers/plot_line_demo_dash_control.py rename to examples/lines_bars_and_markers/line_demo_dash_control.py diff --git a/examples/lines_bars_and_markers/plot_line_styles_reference.py b/examples/lines_bars_and_markers/line_styles_reference.py similarity index 100% rename from examples/lines_bars_and_markers/plot_line_styles_reference.py rename to examples/lines_bars_and_markers/line_styles_reference.py diff --git a/examples/lines_bars_and_markers/plot_linestyles.py b/examples/lines_bars_and_markers/linestyles.py similarity index 100% rename from examples/lines_bars_and_markers/plot_linestyles.py rename to examples/lines_bars_and_markers/linestyles.py diff --git a/examples/lines_bars_and_markers/plot_marker_fillstyle_reference.py b/examples/lines_bars_and_markers/marker_fillstyle_reference.py similarity index 100% rename from examples/lines_bars_and_markers/plot_marker_fillstyle_reference.py rename to examples/lines_bars_and_markers/marker_fillstyle_reference.py diff --git a/examples/lines_bars_and_markers/plot_marker_reference.py b/examples/lines_bars_and_markers/marker_reference.py similarity index 100% rename from examples/lines_bars_and_markers/plot_marker_reference.py rename to examples/lines_bars_and_markers/marker_reference.py diff --git a/examples/lines_bars_and_markers/plot_multicolored_line.py b/examples/lines_bars_and_markers/multicolored_line.py similarity index 100% rename from examples/lines_bars_and_markers/plot_multicolored_line.py rename to examples/lines_bars_and_markers/multicolored_line.py diff --git a/examples/lines_bars_and_markers/plot_scatter_with_legend.py b/examples/lines_bars_and_markers/scatter_with_legend.py similarity index 100% rename from examples/lines_bars_and_markers/plot_scatter_with_legend.py rename to examples/lines_bars_and_markers/scatter_with_legend.py diff --git a/examples/mplot3d/plot_2dcollections3d.py b/examples/mplot3d/2dcollections3d.py similarity index 100% rename from examples/mplot3d/plot_2dcollections3d.py rename to examples/mplot3d/2dcollections3d.py diff --git a/examples/mplot3d/plot_3d_bars.py b/examples/mplot3d/3d_bars.py similarity index 100% rename from examples/mplot3d/plot_3d_bars.py rename to examples/mplot3d/3d_bars.py diff --git a/examples/mplot3d/plot_bars3d.py b/examples/mplot3d/bars3d.py similarity index 100% rename from examples/mplot3d/plot_bars3d.py rename to examples/mplot3d/bars3d.py diff --git a/examples/mplot3d/plot_contour3d.py b/examples/mplot3d/contour3d.py similarity index 100% rename from examples/mplot3d/plot_contour3d.py rename to examples/mplot3d/contour3d.py diff --git a/examples/mplot3d/plot_contour3d_2.py b/examples/mplot3d/contour3d_2.py similarity index 100% rename from examples/mplot3d/plot_contour3d_2.py rename to examples/mplot3d/contour3d_2.py diff --git a/examples/mplot3d/plot_contour3d_3.py b/examples/mplot3d/contour3d_3.py similarity index 100% rename from examples/mplot3d/plot_contour3d_3.py rename to examples/mplot3d/contour3d_3.py diff --git a/examples/mplot3d/plot_contourf3d.py b/examples/mplot3d/contourf3d.py similarity index 100% rename from examples/mplot3d/plot_contourf3d.py rename to examples/mplot3d/contourf3d.py diff --git a/examples/mplot3d/plot_contourf3d_2.py b/examples/mplot3d/contourf3d_2.py similarity index 100% rename from examples/mplot3d/plot_contourf3d_2.py rename to examples/mplot3d/contourf3d_2.py diff --git a/examples/mplot3d/plot_custom_shaded_3d_surface.py b/examples/mplot3d/custom_shaded_3d_surface.py similarity index 100% rename from examples/mplot3d/plot_custom_shaded_3d_surface.py rename to examples/mplot3d/custom_shaded_3d_surface.py diff --git a/examples/mplot3d/plot_hist3d.py b/examples/mplot3d/hist3d.py similarity index 100% rename from examples/mplot3d/plot_hist3d.py rename to examples/mplot3d/hist3d.py diff --git a/examples/mplot3d/plot_lines3d.py b/examples/mplot3d/lines3d.py similarity index 100% rename from examples/mplot3d/plot_lines3d.py rename to examples/mplot3d/lines3d.py diff --git a/examples/mplot3d/plot_lorenz_attractor.py b/examples/mplot3d/lorenz_attractor.py similarity index 100% rename from examples/mplot3d/plot_lorenz_attractor.py rename to examples/mplot3d/lorenz_attractor.py diff --git a/examples/mplot3d/plot_mixed_subplots.py b/examples/mplot3d/mixed_subplots.py similarity index 100% rename from examples/mplot3d/plot_mixed_subplots.py rename to examples/mplot3d/mixed_subplots.py diff --git a/examples/mplot3d/plot_offset.py b/examples/mplot3d/offset.py similarity index 100% rename from examples/mplot3d/plot_offset.py rename to examples/mplot3d/offset.py diff --git a/examples/mplot3d/plot_pathpatch3d.py b/examples/mplot3d/pathpatch3d.py similarity index 100% rename from examples/mplot3d/plot_pathpatch3d.py rename to examples/mplot3d/pathpatch3d.py diff --git a/examples/mplot3d/plot_polys3d.py b/examples/mplot3d/polys3d.py similarity index 100% rename from examples/mplot3d/plot_polys3d.py rename to examples/mplot3d/polys3d.py diff --git a/examples/mplot3d/plot_quiver3d.py b/examples/mplot3d/quiver3d.py similarity index 100% rename from examples/mplot3d/plot_quiver3d.py rename to examples/mplot3d/quiver3d.py diff --git a/examples/mplot3d/plot_rotate_axes3d.py b/examples/mplot3d/rotate_axes3d.py similarity index 100% rename from examples/mplot3d/plot_rotate_axes3d.py rename to examples/mplot3d/rotate_axes3d.py diff --git a/examples/mplot3d/plot_scatter3d.py b/examples/mplot3d/scatter3d.py similarity index 100% rename from examples/mplot3d/plot_scatter3d.py rename to examples/mplot3d/scatter3d.py diff --git a/examples/mplot3d/plot_subplot3d.py b/examples/mplot3d/subplot3d.py similarity index 100% rename from examples/mplot3d/plot_subplot3d.py rename to examples/mplot3d/subplot3d.py diff --git a/examples/mplot3d/plot_surface3d.py b/examples/mplot3d/surface3d.py similarity index 100% rename from examples/mplot3d/plot_surface3d.py rename to examples/mplot3d/surface3d.py diff --git a/examples/mplot3d/plot_surface3d_2.py b/examples/mplot3d/surface3d_2.py similarity index 100% rename from examples/mplot3d/plot_surface3d_2.py rename to examples/mplot3d/surface3d_2.py diff --git a/examples/mplot3d/plot_surface3d_3.py b/examples/mplot3d/surface3d_3.py similarity index 100% rename from examples/mplot3d/plot_surface3d_3.py rename to examples/mplot3d/surface3d_3.py diff --git a/examples/mplot3d/plot_surface3d_radial.py b/examples/mplot3d/surface3d_radial.py similarity index 100% rename from examples/mplot3d/plot_surface3d_radial.py rename to examples/mplot3d/surface3d_radial.py diff --git a/examples/mplot3d/plot_text3d.py b/examples/mplot3d/text3d.py similarity index 100% rename from examples/mplot3d/plot_text3d.py rename to examples/mplot3d/text3d.py diff --git a/examples/mplot3d/plot_tricontour3d.py b/examples/mplot3d/tricontour3d.py similarity index 100% rename from examples/mplot3d/plot_tricontour3d.py rename to examples/mplot3d/tricontour3d.py diff --git a/examples/mplot3d/plot_tricontourf3d.py b/examples/mplot3d/tricontourf3d.py similarity index 100% rename from examples/mplot3d/plot_tricontourf3d.py rename to examples/mplot3d/tricontourf3d.py diff --git a/examples/mplot3d/plot_trisurf3d.py b/examples/mplot3d/trisurf3d.py similarity index 100% rename from examples/mplot3d/plot_trisurf3d.py rename to examples/mplot3d/trisurf3d.py diff --git a/examples/mplot3d/plot_trisurf3d_2.py b/examples/mplot3d/trisurf3d_2.py similarity index 100% rename from examples/mplot3d/plot_trisurf3d_2.py rename to examples/mplot3d/trisurf3d_2.py diff --git a/examples/mplot3d/plot_wire3d.py b/examples/mplot3d/wire3d.py similarity index 100% rename from examples/mplot3d/plot_wire3d.py rename to examples/mplot3d/wire3d.py diff --git a/examples/mplot3d/plot_wire3d_animation.py b/examples/mplot3d/wire3d_animation.py similarity index 100% rename from examples/mplot3d/plot_wire3d_animation.py rename to examples/mplot3d/wire3d_animation.py diff --git a/examples/mplot3d/plot_wire3d_zero_stride.py b/examples/mplot3d/wire3d_zero_stride.py similarity index 100% rename from examples/mplot3d/plot_wire3d_zero_stride.py rename to examples/mplot3d/wire3d_zero_stride.py diff --git a/examples/pie_and_polar_charts/plot_pie_features.py b/examples/pie_and_polar_charts/pie_features.py similarity index 100% rename from examples/pie_and_polar_charts/plot_pie_features.py rename to examples/pie_and_polar_charts/pie_features.py diff --git a/examples/pie_and_polar_charts/plot_polar_bar.py b/examples/pie_and_polar_charts/polar_bar.py similarity index 100% rename from examples/pie_and_polar_charts/plot_polar_bar.py rename to examples/pie_and_polar_charts/polar_bar.py diff --git a/examples/pie_and_polar_charts/plot_polar_scatter.py b/examples/pie_and_polar_charts/polar_scatter.py similarity index 100% rename from examples/pie_and_polar_charts/plot_polar_scatter.py rename to examples/pie_and_polar_charts/polar_scatter.py diff --git a/examples/shapes_and_collections/plot_artist_reference.py b/examples/shapes_and_collections/artist_reference.py similarity index 100% rename from examples/shapes_and_collections/plot_artist_reference.py rename to examples/shapes_and_collections/artist_reference.py diff --git a/examples/shapes_and_collections/plot_path_patch.py b/examples/shapes_and_collections/path_patch.py similarity index 100% rename from examples/shapes_and_collections/plot_path_patch.py rename to examples/shapes_and_collections/path_patch.py diff --git a/examples/shapes_and_collections/plot_scatter.py b/examples/shapes_and_collections/scatter.py similarity index 100% rename from examples/shapes_and_collections/plot_scatter.py rename to examples/shapes_and_collections/scatter.py diff --git a/examples/showcase/plot_anatomy.py b/examples/showcase/anatomy.py similarity index 100% rename from examples/showcase/plot_anatomy.py rename to examples/showcase/anatomy.py diff --git a/examples/showcase/plot_bachelors_degrees_by_gender.py b/examples/showcase/bachelors_degrees_by_gender.py similarity index 100% rename from examples/showcase/plot_bachelors_degrees_by_gender.py rename to examples/showcase/bachelors_degrees_by_gender.py diff --git a/examples/showcase/plot_firefox.py b/examples/showcase/firefox.py similarity index 100% rename from examples/showcase/plot_firefox.py rename to examples/showcase/firefox.py diff --git a/examples/showcase/plot_integral.py b/examples/showcase/integral.py similarity index 100% rename from examples/showcase/plot_integral.py rename to examples/showcase/integral.py diff --git a/examples/showcase/plot_mandelbrot.py b/examples/showcase/mandelbrot.py similarity index 100% rename from examples/showcase/plot_mandelbrot.py rename to examples/showcase/mandelbrot.py diff --git a/examples/showcase/plot_xkcd.py b/examples/showcase/xkcd.py similarity index 100% rename from examples/showcase/plot_xkcd.py rename to examples/showcase/xkcd.py diff --git a/examples/statistics/plot_boxplot.py b/examples/statistics/boxplot.py similarity index 100% rename from examples/statistics/plot_boxplot.py rename to examples/statistics/boxplot.py diff --git a/examples/statistics/plot_boxplot_color.py b/examples/statistics/boxplot_color.py similarity index 100% rename from examples/statistics/plot_boxplot_color.py rename to examples/statistics/boxplot_color.py diff --git a/examples/statistics/plot_boxplot_vs_violin.py b/examples/statistics/boxplot_vs_violin.py similarity index 100% rename from examples/statistics/plot_boxplot_vs_violin.py rename to examples/statistics/boxplot_vs_violin.py diff --git a/examples/statistics/plot_bxp.py b/examples/statistics/bxp.py similarity index 100% rename from examples/statistics/plot_bxp.py rename to examples/statistics/bxp.py diff --git a/examples/statistics/plot_customized_violin.py b/examples/statistics/customized_violin.py similarity index 100% rename from examples/statistics/plot_customized_violin.py rename to examples/statistics/customized_violin.py diff --git a/examples/statistics/plot_errorbar.py b/examples/statistics/errorbar.py similarity index 100% rename from examples/statistics/plot_errorbar.py rename to examples/statistics/errorbar.py diff --git a/examples/statistics/plot_errorbar_features.py b/examples/statistics/errorbar_features.py similarity index 100% rename from examples/statistics/plot_errorbar_features.py rename to examples/statistics/errorbar_features.py diff --git a/examples/statistics/plot_errorbar_limits.py b/examples/statistics/errorbar_limits.py similarity index 100% rename from examples/statistics/plot_errorbar_limits.py rename to examples/statistics/errorbar_limits.py diff --git a/examples/statistics/plot_errorbars_and_boxes.py b/examples/statistics/errorbars_and_boxes.py similarity index 100% rename from examples/statistics/plot_errorbars_and_boxes.py rename to examples/statistics/errorbars_and_boxes.py diff --git a/examples/statistics/plot_hist.py b/examples/statistics/hist.py similarity index 100% rename from examples/statistics/plot_hist.py rename to examples/statistics/hist.py diff --git a/examples/statistics/plot_histogram_cumulative.py b/examples/statistics/histogram_cumulative.py similarity index 100% rename from examples/statistics/plot_histogram_cumulative.py rename to examples/statistics/histogram_cumulative.py diff --git a/examples/statistics/plot_histogram_features.py b/examples/statistics/histogram_features.py similarity index 100% rename from examples/statistics/plot_histogram_features.py rename to examples/statistics/histogram_features.py diff --git a/examples/statistics/plot_histogram_histtypes.py b/examples/statistics/histogram_histtypes.py similarity index 100% rename from examples/statistics/plot_histogram_histtypes.py rename to examples/statistics/histogram_histtypes.py diff --git a/examples/statistics/plot_histogram_multihist.py b/examples/statistics/histogram_multihist.py similarity index 100% rename from examples/statistics/plot_histogram_multihist.py rename to examples/statistics/histogram_multihist.py diff --git a/examples/statistics/plot_multiple_histograms_side_by_side.py b/examples/statistics/multiple_histograms_side_by_side.py similarity index 100% rename from examples/statistics/plot_multiple_histograms_side_by_side.py rename to examples/statistics/multiple_histograms_side_by_side.py diff --git a/examples/statistics/plot_violinplot.py b/examples/statistics/violinplot.py similarity index 100% rename from examples/statistics/plot_violinplot.py rename to examples/statistics/violinplot.py diff --git a/examples/style_sheets/plot_bmh.py b/examples/style_sheets/bmh.py similarity index 100% rename from examples/style_sheets/plot_bmh.py rename to examples/style_sheets/bmh.py diff --git a/examples/style_sheets/plot_dark_background.py b/examples/style_sheets/dark_background.py similarity index 100% rename from examples/style_sheets/plot_dark_background.py rename to examples/style_sheets/dark_background.py diff --git a/examples/style_sheets/plot_fivethirtyeight.py b/examples/style_sheets/fivethirtyeight.py similarity index 100% rename from examples/style_sheets/plot_fivethirtyeight.py rename to examples/style_sheets/fivethirtyeight.py diff --git a/examples/style_sheets/plot_ggplot.py b/examples/style_sheets/ggplot.py similarity index 100% rename from examples/style_sheets/plot_ggplot.py rename to examples/style_sheets/ggplot.py diff --git a/examples/style_sheets/plot_grayscale.py b/examples/style_sheets/grayscale.py similarity index 100% rename from examples/style_sheets/plot_grayscale.py rename to examples/style_sheets/grayscale.py diff --git a/examples/style_sheets/plot_style_sheets_reference.py b/examples/style_sheets/style_sheets_reference.py similarity index 100% rename from examples/style_sheets/plot_style_sheets_reference.py rename to examples/style_sheets/style_sheets_reference.py diff --git a/examples/subplots_axes_and_figures/plot_equal_aspect_ratio.py b/examples/subplots_axes_and_figures/equal_aspect_ratio.py similarity index 100% rename from examples/subplots_axes_and_figures/plot_equal_aspect_ratio.py rename to examples/subplots_axes_and_figures/equal_aspect_ratio.py diff --git a/examples/subplots_axes_and_figures/plot_fahrenheit_celsius_scales.py b/examples/subplots_axes_and_figures/fahrenheit_celsius_scales.py similarity index 100% rename from examples/subplots_axes_and_figures/plot_fahrenheit_celsius_scales.py rename to examples/subplots_axes_and_figures/fahrenheit_celsius_scales.py diff --git a/examples/subplots_axes_and_figures/plot_ganged_plots.py b/examples/subplots_axes_and_figures/ganged_plots.py similarity index 100% rename from examples/subplots_axes_and_figures/plot_ganged_plots.py rename to examples/subplots_axes_and_figures/ganged_plots.py diff --git a/examples/subplots_axes_and_figures/plot_subplot.py b/examples/subplots_axes_and_figures/subplot.py similarity index 100% rename from examples/subplots_axes_and_figures/plot_subplot.py rename to examples/subplots_axes_and_figures/subplot.py diff --git a/examples/text_labels_and_annotations/plot_accented_text.py b/examples/text_labels_and_annotations/accented_text.py similarity index 100% rename from examples/text_labels_and_annotations/plot_accented_text.py rename to examples/text_labels_and_annotations/accented_text.py diff --git a/examples/text_labels_and_annotations/plot_autowrap.py b/examples/text_labels_and_annotations/autowrap.py similarity index 100% rename from examples/text_labels_and_annotations/plot_autowrap.py rename to examples/text_labels_and_annotations/autowrap.py diff --git a/examples/text_labels_and_annotations/plot_rainbow_text.py b/examples/text_labels_and_annotations/rainbow_text.py similarity index 100% rename from examples/text_labels_and_annotations/plot_rainbow_text.py rename to examples/text_labels_and_annotations/rainbow_text.py diff --git a/examples/text_labels_and_annotations/plot_text_alignment.py b/examples/text_labels_and_annotations/text_alignment.py similarity index 100% rename from examples/text_labels_and_annotations/plot_text_alignment.py rename to examples/text_labels_and_annotations/text_alignment.py diff --git a/examples/text_labels_and_annotations/plot_text_fontdict.py b/examples/text_labels_and_annotations/text_fontdict.py similarity index 100% rename from examples/text_labels_and_annotations/plot_text_fontdict.py rename to examples/text_labels_and_annotations/text_fontdict.py diff --git a/examples/text_labels_and_annotations/plot_text_rotation.py b/examples/text_labels_and_annotations/text_rotation.py similarity index 100% rename from examples/text_labels_and_annotations/plot_text_rotation.py rename to examples/text_labels_and_annotations/text_rotation.py diff --git a/examples/ticks_and_spines/plot_scalarformatter.py b/examples/ticks_and_spines/scalarformatter.py similarity index 100% rename from examples/ticks_and_spines/plot_scalarformatter.py rename to examples/ticks_and_spines/scalarformatter.py diff --git a/examples/ticks_and_spines/plot_spines.py b/examples/ticks_and_spines/spines.py similarity index 100% rename from examples/ticks_and_spines/plot_spines.py rename to examples/ticks_and_spines/spines.py diff --git a/examples/ticks_and_spines/plot_spines_bounds.py b/examples/ticks_and_spines/spines_bounds.py similarity index 100% rename from examples/ticks_and_spines/plot_spines_bounds.py rename to examples/ticks_and_spines/spines_bounds.py diff --git a/examples/ticks_and_spines/plot_spines_dropped.py b/examples/ticks_and_spines/spines_dropped.py similarity index 100% rename from examples/ticks_and_spines/plot_spines_dropped.py rename to examples/ticks_and_spines/spines_dropped.py diff --git a/examples/ticks_and_spines/plot_tick-formatters.py b/examples/ticks_and_spines/tick-formatters.py similarity index 100% rename from examples/ticks_and_spines/plot_tick-formatters.py rename to examples/ticks_and_spines/tick-formatters.py diff --git a/examples/ticks_and_spines/plot_tick-locators.py b/examples/ticks_and_spines/tick-locators.py similarity index 100% rename from examples/ticks_and_spines/plot_tick-locators.py rename to examples/ticks_and_spines/tick-locators.py diff --git a/examples/ticks_and_spines/plot_tick_labels_from_values.py b/examples/ticks_and_spines/tick_labels_from_values.py similarity index 100% rename from examples/ticks_and_spines/plot_tick_labels_from_values.py rename to examples/ticks_and_spines/tick_labels_from_values.py diff --git a/examples/ticks_and_spines/plot_ticklabels_rotation.py b/examples/ticks_and_spines/ticklabels_rotation.py similarity index 100% rename from examples/ticks_and_spines/plot_ticklabels_rotation.py rename to examples/ticks_and_spines/ticklabels_rotation.py From 6763f83e43f6411248aa770ff1dfe5a8d9114f5d Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Mon, 10 Apr 2017 22:20:50 -0700 Subject: [PATCH 25/27] sed source names and manual fixes sed -i 's/\bplot_\([[:alnum:]_]*\.py\)/\1/g' **/*.py **/*.rst sed -i 's/-plot_/-/g' **/*.rst git checkout -- doc/users/github_stats.rst doc/users/changelog.rst --- doc/conf.py | 7 ++-- doc/faq/howto_faq.rst | 6 ++-- doc/make.py | 8 ++--- doc/mpl_toolkits/index.rst | 2 +- doc/mpl_toolkits/mplot3d/tutorial.rst | 38 +++++++++++----------- doc/users/legend_guide.rst | 4 +-- doc/users/prev_whats_new/whats_new_1.1.rst | 12 +++---- doc/users/prev_whats_new/whats_new_1.2.rst | 4 +-- doc/users/prev_whats_new/whats_new_1.3.rst | 4 +-- doc/users/prev_whats_new/whats_new_1.4.rst | 8 ++--- doc/users/prev_whats_new/whats_new_1.5.rst | 4 +-- doc/users/screenshots.rst | 22 ++++++------- doc/users/transforms_tutorial.rst | 2 +- doc/users/whats_new.rst | 2 +- examples/tests/backend_driver.py | 30 ++++++++--------- lib/matplotlib/axes/_axes.py | 20 ++++++------ lib/matplotlib/path.py | 2 +- lib/matplotlib/pyplot.py | 4 +-- lib/matplotlib/sankey.py | 2 +- lib/mpl_toolkits/mplot3d/axes3d.py | 6 ++-- 20 files changed, 93 insertions(+), 94 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 82261bd08834..0e6fc0390a6c 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -106,10 +106,9 @@ # Sphinx gallery configuration sphinx_gallery_conf = { - # path to your examples scripts - 'examples_dirs' : '../examples', - # path where to save gallery generated examples - 'gallery_dirs' : 'gallery'} + 'examples_dirs': '../examples', + 'filename_pattern': '\.py$', + 'gallery_dirs': 'gallery'} plot_gallery = True diff --git a/doc/faq/howto_faq.rst b/doc/faq/howto_faq.rst index 613260fd7d51..6ef6851af336 100644 --- a/doc/faq/howto_faq.rst +++ b/doc/faq/howto_faq.rst @@ -353,7 +353,7 @@ some ratio which controls the ratio:: .. htmlonly:: - See :ref:`subplots_axes_and_figures-plot_equal_aspect_ratio` for a complete + See :ref:`subplots_axes_and_figures-equal_aspect_ratio` for a complete example. @@ -398,7 +398,7 @@ locators as desired because the two axes are independent. .. htmlonly:: - See :ref:`api-plot_two_scales` for a complete example + See :ref:`api-two_scales` for a complete example .. _howto-batch: @@ -644,7 +644,7 @@ For more on configuring your backend, see Alternatively, you can avoid pylab/pyplot altogether, which will give you a little more control, by calling the API directly as shown in -:ref:`api-plot_agg_oo`. +:ref:`api-agg_oo`. You can either generate hardcopy on the filesystem by calling savefig:: diff --git a/doc/make.py b/doc/make.py index dd1a4878c3b3..deda60ca2a44 100755 --- a/doc/make.py +++ b/doc/make.py @@ -57,10 +57,10 @@ def linkcheck(): FRONTPAGE_PY_PATH = "../examples/frontpage/" # python scripts location FRONTPAGE_PNG_PATH = "_static/" # png files location # png files and corresponding generation scripts: -FRONTPAGE_PNGS = {"surface3d_frontpage.png": "plot_3D.py", - "contour_frontpage.png": "plot_contour.py", - "histogram_frontpage.png": "plot_histogram.py", - "membrane_frontpage.png": "plot_membrane.py"} +FRONTPAGE_PNGS = {"surface3d_frontpage.png": "3D.py", + "contour_frontpage.png": "contour.py", + "histogram_frontpage.png": "histogram.py", + "membrane_frontpage.png": "membrane.py"} def generate_frontpage_pngs(only_if_needed=True): diff --git a/doc/mpl_toolkits/index.rst b/doc/mpl_toolkits/index.rst index fd504e4e9dda..8b6538bdcc34 100644 --- a/doc/mpl_toolkits/index.rst +++ b/doc/mpl_toolkits/index.rst @@ -30,7 +30,7 @@ plotting (scatter, surf, line, mesh) tools. Not the fastest or feature complete 3D library out there, but ships with Matplotlib and thus may be a lighter weight solution for some use cases. -.. plot:: gallery/mplot3d/plot_contourf3d_2.py +.. plot:: gallery/mplot3d/contourf3d_2.py .. _toolkit_axes_grid1: diff --git a/doc/mpl_toolkits/mplot3d/tutorial.rst b/doc/mpl_toolkits/mplot3d/tutorial.rst index bb5f0feaa697..afef33049adf 100644 --- a/doc/mpl_toolkits/mplot3d/tutorial.rst +++ b/doc/mpl_toolkits/mplot3d/tutorial.rst @@ -36,7 +36,7 @@ Line plots ==================== .. automethod:: Axes3D.plot -.. plot:: gallery/mplot3d/plot_lines3d.py +.. plot:: gallery/mplot3d/lines3d.py .. _scatter3d: @@ -44,7 +44,7 @@ Scatter plots ============= .. automethod:: Axes3D.scatter -.. plot:: gallery/mplot3d/plot_scatter3d.py +.. plot:: gallery/mplot3d/scatter3d.py .. _wireframe: @@ -52,7 +52,7 @@ Wireframe plots =============== .. automethod:: Axes3D.plot_wireframe -.. plot:: gallery/mplot3d/plot_wire3d.py +.. plot:: gallery/mplot3d/wire3d.py .. _surface: @@ -60,9 +60,9 @@ Surface plots ============= .. automethod:: Axes3D.plot_surface -.. plot:: gallery/mplot3d/plot_surface3d.py -.. plot:: gallery/mplot3d/plot_surface3d_2.py -.. plot:: gallery/mplot3d/plot_surface3d_3.py +.. plot:: gallery/mplot3d/surface3d.py +.. plot:: gallery/mplot3d/surface3d_2.py +.. plot:: gallery/mplot3d/surface3d_3.py .. _trisurface: @@ -70,7 +70,7 @@ Tri-Surface plots ================= .. automethod:: Axes3D.plot_trisurf -.. plot:: gallery/mplot3d/plot_trisurf3d.py +.. plot:: gallery/mplot3d/trisurf3d.py .. _contour3d: @@ -79,9 +79,9 @@ Contour plots ============= .. automethod:: Axes3D.contour -.. plot:: gallery/mplot3d/plot_contour3d.py -.. plot:: gallery/mplot3d/plot_contour3d_2.py -.. plot:: gallery/mplot3d/plot_contour3d_3.py +.. plot:: gallery/mplot3d/contour3d.py +.. plot:: gallery/mplot3d/contour3d_2.py +.. plot:: gallery/mplot3d/contour3d_3.py .. _contourf3d: @@ -89,8 +89,8 @@ Filled contour plots ==================== .. automethod:: Axes3D.contourf -.. plot:: gallery/mplot3d/plot_contourf3d.py -.. plot:: gallery/mplot3d/plot_contourf3d_2.py +.. plot:: gallery/mplot3d/contourf3d.py +.. plot:: gallery/mplot3d/contourf3d_2.py .. versionadded:: 1.1.0 The feature demoed in the second contourf3d example was enabled as a @@ -102,7 +102,7 @@ Polygon plots ==================== .. automethod:: Axes3D.add_collection3d -.. plot:: gallery/mplot3d/plot_polys3d.py +.. plot:: gallery/mplot3d/polys3d.py .. _bar3d: @@ -110,7 +110,7 @@ Bar plots ==================== .. automethod:: Axes3D.bar -.. plot:: gallery/mplot3d/plot_bars3d.py +.. plot:: gallery/mplot3d/bars3d.py .. _quiver3d: @@ -118,13 +118,13 @@ Quiver ==================== .. automethod:: Axes3D.quiver -.. plot:: gallery/mplot3d/plot_quiver3d.py +.. plot:: gallery/mplot3d/quiver3d.py .. _2dcollections3d: 2D plots in 3D ==================== -.. plot:: gallery/mplot3d/plot_2dcollections3d.py +.. plot:: gallery/mplot3d/2dcollections3d.py .. _text3d: @@ -132,7 +132,7 @@ Text ==================== .. automethod:: Axes3D.text -.. plot:: gallery/mplot3d/plot_text3d.py +.. plot:: gallery/mplot3d/text3d.py .. _3dsubplots: @@ -146,5 +146,5 @@ in the same figure. Subplotting 3D plots was added in v1.0.0. Earlier version can not do this. -.. plot:: gallery/mplot3d/plot_subplot3d.py -.. plot:: gallery/mplot3d/plot_mixed_subplots.py +.. plot:: gallery/mplot3d/subplot3d.py +.. plot:: gallery/mplot3d/mixed_subplots.py diff --git a/doc/users/legend_guide.rst b/doc/users/legend_guide.rst index 59686ce70c35..1ee6448059ce 100644 --- a/doc/users/legend_guide.rst +++ b/doc/users/legend_guide.rst @@ -289,8 +289,8 @@ Known examples of using legend Here is a non-exhaustive list of the examples available involving legend being used in various ways: -* :ref:`api-plot_legend` -* :ref:`lines_bars_and_markers-plot_scatter_with_legend` +* :ref:`api-legend` +* :ref:`lines_bars_and_markers-scatter_with_legend` * :ref:`pylab_examples-contourf_hatching` * :ref:`pylab_examples-figlegend_demo` * :ref:`pylab_examples-scatter_symbol` diff --git a/doc/users/prev_whats_new/whats_new_1.1.rst b/doc/users/prev_whats_new/whats_new_1.1.rst index 6ae61899cfd3..bd704b305310 100644 --- a/doc/users/prev_whats_new/whats_new_1.1.rst +++ b/doc/users/prev_whats_new/whats_new_1.1.rst @@ -17,10 +17,10 @@ Sankey Diagrams Kevin Davies has extended Yannick Copin's original Sankey example into a module (:mod:`~matplotlib.sankey`) and provided new examples -(:ref:`api-plot_sankey_basics`, :ref:`api-plot_sankey_links`, -:ref:`api-plot_sankey_rankine`). +(:ref:`api-sankey_basics`, :ref:`api-sankey_links`, +:ref:`api-sankey_rankine`). -.. plot:: gallery/api/plot_sankey_rankine.py +.. plot:: gallery/api/sankey_rankine.py Animation @@ -135,12 +135,12 @@ as 2D plotting, Ben Root has made several improvements to the * Ticker offset display added: -.. plot:: gallery/mplot3d/plot_offset.py +.. plot:: gallery/mplot3d/offset.py * :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.contourf` gains *zdir* and *offset* kwargs. You can now do this: -.. plot:: gallery/mplot3d/plot_contourf3d_2.py +.. plot:: gallery/mplot3d/contourf3d_2.py Numerix support removed ----------------------- @@ -205,6 +205,6 @@ Other improvements * Pim Schellart added a new colormap called "cubehelix". Sameer Grover also added a colormap called "coolwarm". See it and all - other colormaps :ref:`here `. + other colormaps :ref:`here `. * Many bug fixes and documentation improvements. diff --git a/doc/users/prev_whats_new/whats_new_1.2.rst b/doc/users/prev_whats_new/whats_new_1.2.rst index 847a0e56b154..f6dc7d2eef35 100644 --- a/doc/users/prev_whats_new/whats_new_1.2.rst +++ b/doc/users/prev_whats_new/whats_new_1.2.rst @@ -62,7 +62,7 @@ Damon McDougall added a new plotting method for the :mod:`~mpl_toolkits.mplot3d` toolkit called :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf`. -.. plot:: gallery/mplot3d/plot_trisurf3d.py +.. plot:: gallery/mplot3d/trisurf3d.py Control the lengths of colorbar extensions ------------------------------------------ @@ -153,7 +153,7 @@ In addition to simply plotting the streamlines of the vector field, line widths of the streamlines to a separate parameter, such as the speed or local intensity of the vector field. -.. plot:: gallery/images_contours_and_fields/plot_streamplot_features.py +.. plot:: gallery/images_contours_and_fields/streamplot_features.py New hist functionality diff --git a/doc/users/prev_whats_new/whats_new_1.3.rst b/doc/users/prev_whats_new/whats_new_1.3.rst index 709ea56cb00d..3878f51d677c 100644 --- a/doc/users/prev_whats_new/whats_new_1.3.rst +++ b/doc/users/prev_whats_new/whats_new_1.3.rst @@ -91,7 +91,7 @@ before creating your plot. For really fine control, it is also possible to modify each artist's sketch parameters individually with :meth:`matplotlib.artist.Artist.set_sketch_params`. -.. plot:: gallery/showcase/plot_xkcd.py +.. plot:: gallery/showcase/xkcd.py Updated Axes3D.contour methods ------------------------------ @@ -100,7 +100,7 @@ Damon McDougall updated the :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.tricontourf` methods to allow 3D contour plots on abitrary unstructured user-specified triangulations. -.. plot:: gallery/mplot3d/plot_tricontour3d.py +.. plot:: gallery/mplot3d/tricontour3d.py New eventplot plot type ``````````````````````` diff --git a/doc/users/prev_whats_new/whats_new_1.4.rst b/doc/users/prev_whats_new/whats_new_1.4.rst index f9c6b2327c54..2c1d66b36d85 100644 --- a/doc/users/prev_whats_new/whats_new_1.4.rst +++ b/doc/users/prev_whats_new/whats_new_1.4.rst @@ -82,8 +82,8 @@ with :func:`~matplotlib.Axes.bxp`. Lastly, each artist (e.g., the box, outliers, cap, notches) can now be toggled on or off and their styles can be passed in through individual kwargs. See the examples: -:ref:`statistics-plot_boxplot` and -:ref:`statistics-plot_bxp` +:ref:`statistics-boxplot` and +:ref:`statistics-bxp` Added a bool kwarg, :code:`manage_xticks`, which if False disables the management of the ticks and limits on the x-axis by :func:`~matplotlib.axes.Axes.bxp`. @@ -160,7 +160,7 @@ matplotlib internals were cleaned up to support using such transforms in :class:`~matplotlib.Axes`. This transform is important for some plot types, specifically the Skew-T used in meteorology. -.. plot:: gallery/api/plot_skewt.py +.. plot:: gallery/api/skewt.py Support for specifying properties of wedge and text in pie charts. `````````````````````````````````````````````````````````````````` @@ -243,7 +243,7 @@ term project. This feature is documented in :func:`~mpl_toolkits.mplot3d.Axes3D. The team members are: Ryan Steve D'Souza, Victor B, xbtsw, Yang Wang, David, Caradec Bisesar and Vlad Vassilovski. -.. plot:: gallery/mplot3d/plot_quiver3d.py +.. plot:: gallery/mplot3d/quiver3d.py polar-plot r-tick locations ``````````````````````````` diff --git a/doc/users/prev_whats_new/whats_new_1.5.rst b/doc/users/prev_whats_new/whats_new_1.5.rst index 1361e05acab4..11ccc4cc7365 100644 --- a/doc/users/prev_whats_new/whats_new_1.5.rst +++ b/doc/users/prev_whats_new/whats_new_1.5.rst @@ -109,7 +109,7 @@ You can even multiply cyclers, which is like using `itertools.product()` on two or more property cycles. Remember to use parentheses if writing a multi-line `prop_cycle` parameter. -.. plot:: gallery/color/plot_color_cycle.py +.. plot:: gallery/color/color_cycle.py New Colormaps @@ -367,7 +367,7 @@ kwargs names is not ideal, but `Axes.fill_between` already has a This is particularly useful for plotting pre-binned histograms. -.. plot:: gallery/api/plot_filled_step.py +.. plot:: gallery/api/filled_step.py Square Plot diff --git a/doc/users/screenshots.rst b/doc/users/screenshots.rst index 90620fb3c566..6baf4185cf4a 100644 --- a/doc/users/screenshots.rst +++ b/doc/users/screenshots.rst @@ -22,7 +22,7 @@ Subplot demo Multiple axes (i.e. subplots) are created with the :func:`~matplotlib.pyplot.subplot` command: -.. plot:: gallery/subplots_axes_and_figures/plot_subplot.py +.. plot:: gallery/subplots_axes_and_figures/subplot.py .. _screenshots_histogram_demo: @@ -32,7 +32,7 @@ Histograms The :func:`~matplotlib.pyplot.hist` command automatically generates histograms and returns the bin counts or probabilities: -.. plot:: gallery/statistics/plot_histogram_features.py +.. plot:: gallery/statistics/histogram_features.py .. _screenshots_path_demo: @@ -43,7 +43,7 @@ Path demo You can add arbitrary paths in matplotlib using the :mod:`matplotlib.path` module: -.. plot:: gallery/shapes_and_collections/plot_path_patch.py +.. plot:: gallery/shapes_and_collections/path_patch.py .. _screenshots_mplot3d_surface: @@ -54,7 +54,7 @@ The mplot3d toolkit (see :ref:`toolkit_mplot3d-tutorial` and :ref:`mplot3d-examples-index`) has support for simple 3d graphs including surface, wireframe, scatter, and bar charts. -.. plot:: gallery/mplot3d/plot_surface3d.py +.. plot:: gallery/mplot3d/surface3d.py Thanks to John Porter, Jonathon Taylor, Reinier Heeres, and Ben Root for the `mplot3d` toolkit. This toolkit is included with all standard matplotlib @@ -71,7 +71,7 @@ a vector field. In addition to simply plotting the streamlines, it allows you to map the colors and/or line widths of streamlines to a separate parameter, such as the speed or local intensity of the vector field. -.. plot:: gallery/images_contours_and_fields/plot_streamplot_features.py +.. plot:: gallery/images_contours_and_fields/streamplot_features.py This feature complements the :meth:`~matplotlib.pyplot.quiver` function for plotting vector fields. Thanks to Tom Flannaghan and Tony Yu for adding the @@ -103,7 +103,7 @@ command, which includes customizations such as error bars: It's also simple to create stacked bars (`bar_stacked.py <../examples/pylab_examples/bar_stacked.html>`_), or horizontal bar charts -(`plot_barh.py <../examples/lines_bars_and_markers/plot_barh.html>`_). +(`barh.py <../examples/lines_bars_and_markers/plot_barh.html>`_). .. _screenshots_pie_demo: @@ -117,7 +117,7 @@ exploding one or more wedges from the center of the pie, and a shadow effect. Take a close look at the attached code, which generates this figure in just a few lines of code. -.. plot:: gallery/pie_and_polar_charts/plot_pie_features.py +.. plot:: gallery/pie_and_polar_charts/pie_features.py .. _screenshots_table_demo: @@ -166,7 +166,7 @@ Fill demo The :func:`~matplotlib.pyplot.fill` command lets you plot filled curves and polygons: -.. plot:: gallery/lines_bars_and_markers/plot_fill.py +.. plot:: gallery/lines_bars_and_markers/fill.py Thanks to Andrew Straw for adding this function. @@ -178,7 +178,7 @@ Date demo You can plot date data with major and minor ticks and custom tick formatters for both. -.. plot:: gallery/api/plot_date.py +.. plot:: gallery/api/date.py See :mod:`matplotlib.ticker` and :mod:`matplotlib.dates` for details and usage. @@ -217,7 +217,7 @@ The :func:`~matplotlib.pyplot.legend` command automatically generates figure legends, with MATLAB-compatible legend placement commands. -.. plot:: gallery/api/plot_legend.py +.. plot:: gallery/api/legend.py Thanks to Charles Twardy for input on the legend command. @@ -278,4 +278,4 @@ XKCD-style sketch plots matplotlib supports plotting in the style of `xkcd `. -.. plot:: gallery/showcase/plot_xkcd.py +.. plot:: gallery/showcase/xkcd.py diff --git a/doc/users/transforms_tutorial.rst b/doc/users/transforms_tutorial.rst index 767ce5f428b9..fc3e574f190a 100644 --- a/doc/users/transforms_tutorial.rst +++ b/doc/users/transforms_tutorial.rst @@ -452,4 +452,4 @@ best way to learn more is to open the source for those packages and see how to make your own, since matplotlib supports extensible axes and projections. Michael Droettboom has provided a nice tutorial example of creating a hammer projection axes; see -:ref:`api-plot_custom_projection_example`. +:ref:`api-custom_projection_example`. diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 6923a00af092..078eef4e4912 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -287,7 +287,7 @@ Filled ``+`` and ``x`` markers New fillable *plus* and *x* markers have been added. See the :mod:`~matplotlib.markers` module and -:ref:`marker reference ` +:ref:`marker reference ` examples. `rcount` and `ccount` for `plot_surface()` diff --git a/examples/tests/backend_driver.py b/examples/tests/backend_driver.py index 7e269561ce52..4603bba12a31 100644 --- a/examples/tests/backend_driver.py +++ b/examples/tests/backend_driver.py @@ -51,13 +51,13 @@ files = dict() files['lines'] = [ - 'plot_barh.py', - 'plot_cohere.py', - 'plot_fill.py', + 'barh.py', + 'cohere.py', + 'fill.py', 'fill_demo_features.py', - 'plot_line_demo_dash_control.py', - 'plot_line_styles_reference.py', - 'plot_scatter_with_legend.py' + 'line_demo_dash_control.py', + 'line_styles_reference.py', + 'scatter_with_legend.py' ] files['shapes'] = [ @@ -76,18 +76,18 @@ ] files['statistics'] = [ - 'plot_errorbar.py', - 'plot_errorbar_features.py', - 'plot_histogram_cumulative.py', - 'plot_histogram_features.py', - 'plot_histogram_histtypes.py', - 'plot_histogram_multihist.py', + 'errorbar.py', + 'errorbar_features.py', + 'histogram_cumulative.py', + 'histogram_features.py', + 'histogram_histtypes.py', + 'histogram_multihist.py', ] files['pie'] = [ 'pie_demo.py', - 'plot_polar_bar.py', - 'plot_polar_scatter.py', + 'polar_bar.py', + 'polar_scatter.py', ] files['text_labels_and_annotations'] = [ @@ -205,7 +205,7 @@ 'multiline.py', 'multiple_figs_demo.py', 'nan_test.py', - 'plot_scalarformatter.py', + 'scalarformatter.py', 'pcolor_demo.py', 'pcolor_log.py', 'pcolor_small.py', diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 9fa8d2c11be4..f3930470edec 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -507,7 +507,7 @@ def legend(self, *args, **kwargs): Examples -------- - .. plot:: gallery/api/plot_legend.py + .. plot:: gallery/api/legend.py """ handlers = kwargs.get('handler_map', {}) or {} @@ -2567,7 +2567,7 @@ def pie(self, x, explode=None, labels=None, colors=None, Examples -------- - .. plot:: mpl_examples/pie_and_polar_charts/plot_pie_features.py + .. plot:: mpl_examples/pie_and_polar_charts/pie_features.py """ @@ -2799,7 +2799,7 @@ def errorbar(self, x, y, yerr=None, xerr=None, Examples -------- - .. plot:: gallery/statistics/plot_errorbar.py + .. plot:: gallery/statistics/errorbar.py """ kwargs = cbook.normalize_kwargs(kwargs, _alias_map) @@ -3271,7 +3271,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, Examples -------- - .. plot:: gallery/statistics/plot_boxplot.py + .. plot:: gallery/statistics/boxplot.py """ @@ -3541,7 +3541,7 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True, Examples -------- - .. plot:: gallery/statistics/plot_bxp.py + .. plot:: gallery/statistics/bxp.py """ # lists of artists to be output @@ -3917,7 +3917,7 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None, Examples -------- - .. plot:: gallery/shapes_and_collections/plot_scatter.py + .. plot:: gallery/shapes_and_collections/scatter.py """ @@ -4700,7 +4700,7 @@ def fill(self, *args, **kwargs): Examples -------- - .. plot:: gallery/lines_bars_and_markers/plot_fill.py + .. plot:: gallery/lines_bars_and_markers/fill.py """ @@ -6103,7 +6103,7 @@ def hist(self, x, bins=None, range=None, normed=False, weights=None, Examples -------- - .. plot:: gallery/statistics/plot_histogram_features.py + .. plot:: gallery/statistics/histogram_features.py """ # Avoid shadowing the builtin. @@ -6487,7 +6487,7 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None, Examples -------- - .. plot:: gallery/statistics/plot_hist.py + .. plot:: gallery/statistics/hist.py """ h, xedges, yedges = np.histogram2d(x, y, bins=bins, range=range, @@ -7068,7 +7068,7 @@ def cohere(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, Examples -------- - .. plot:: gallery/lines_bars_and_markers/plot_cohere.py + .. plot:: gallery/lines_bars_and_markers/cohere.py """ if not self._hold: self.cla() diff --git a/lib/matplotlib/path.py b/lib/matplotlib/path.py index 59749ae345ca..a17fbd29f74f 100644 --- a/lib/matplotlib/path.py +++ b/lib/matplotlib/path.py @@ -317,7 +317,7 @@ def make_compound_path_from_polys(cls, XY): numsides x 2) numpy array of vertices. Return object is a :class:`Path` - .. plot:: gallery/api/plot_histogram_path.py + .. plot:: gallery/api/histogram_path.py """ diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index a1a5c0fd709c..e265e37b5366 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -1037,12 +1037,12 @@ def subplot(*args, **kwargs): For additional information on :func:`axes` and :func:`subplot` keyword arguments. - :file:`gallery/pie_and_polar_charts/plot_polar_scatter.py` + :file:`gallery/pie_and_polar_charts/polar_scatter.py` For an example **Example:** - .. plot:: gallery/subplots_axes_and_figures/plot_subplot.py + .. plot:: gallery/subplots_axes_and_figures/subplot.py """ # if subplot called without arguments, create subplot(1,1,1) diff --git a/lib/matplotlib/sankey.py b/lib/matplotlib/sankey.py index 433e1fd33ab0..d57a66333ba8 100644 --- a/lib/matplotlib/sankey.py +++ b/lib/matplotlib/sankey.py @@ -118,7 +118,7 @@ def __init__(self, ax=None, scale=1.0, unit='', format='%G', gap=0.25, **Examples:** - .. plot:: gallery/api/plot_sankey_basics.py + .. plot:: gallery/api/sankey_basics.py """ # Check the arguments. if gap < 0: diff --git a/lib/mpl_toolkits/mplot3d/axes3d.py b/lib/mpl_toolkits/mplot3d/axes3d.py index 2fda24b1f909..2e03c4d762f4 100644 --- a/lib/mpl_toolkits/mplot3d/axes3d.py +++ b/lib/mpl_toolkits/mplot3d/axes3d.py @@ -1911,8 +1911,8 @@ def plot_trisurf(self, *args, **kwargs): **Examples:** - .. plot:: gallery/mplot3d/plot_trisurf3d.py - .. plot:: gallery/mplot3d/plot_trisurf3d_2.py + .. plot:: gallery/mplot3d/trisurf3d.py + .. plot:: gallery/mplot3d/trisurf3d_2.py .. versionadded:: 1.2.0 This plotting function was added for the v1.2.0 release. @@ -2464,7 +2464,7 @@ def bar3d(self, x, y, z, dx, dy, dz, color=None, Examples -------- - .. plot:: mpl_examples/mplot3d/plot_3d_bars.py + .. plot:: mpl_examples/mplot3d/3d_bars.py """ From e01eb8def37c58a3555ff060fb7a3ed1b0513b49 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Tue, 11 Apr 2017 10:33:48 -0700 Subject: [PATCH 26/27] Update .gitignore for s-g --- .gitignore | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f14f5cfe725e..c438a51629c0 100644 --- a/.gitignore +++ b/.gitignore @@ -58,11 +58,13 @@ lib/matplotlib/mpl-data/matplotlibrc # Documentation generated files # ################################# +doc/api/_as_gen doc/examples +# autogenerated by sphinx-gallery +doc/modules +doc/pyplots/tex_demo.png doc/users/installing.rst doc/_static/matplotlibrc -doc/pyplots/tex_demo.png -doc/api/_as_gen lib/dateutil examples/*/*.pdf examples/*/*.png From 3f1ba021967eeebdb728f41e5e906a0400caecc8 Mon Sep 17 00:00:00 2001 From: Christopher Holdgraf Date: Tue, 11 Apr 2017 13:02:10 -0700 Subject: [PATCH 27/27] fixing a couple links --- doc/users/image_tutorial.rst | 2 +- doc/users/screenshots.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/users/image_tutorial.rst b/doc/users/image_tutorial.rst index 6fbc4194ce39..1d1f58ee5e82 100644 --- a/doc/users/image_tutorial.rst +++ b/doc/users/image_tutorial.rst @@ -226,7 +226,7 @@ Note that you can also change colormaps on existing plot objects using the There are many other colormap schemes available. See the `list and images of the colormaps -<../examples/color/plot_colormaps_reference.html>`_. +<../examples/color/colormaps_reference.html>`_. .. _`Color Bars`: diff --git a/doc/users/screenshots.rst b/doc/users/screenshots.rst index 6baf4185cf4a..884dc18b7992 100644 --- a/doc/users/screenshots.rst +++ b/doc/users/screenshots.rst @@ -103,7 +103,7 @@ command, which includes customizations such as error bars: It's also simple to create stacked bars (`bar_stacked.py <../examples/pylab_examples/bar_stacked.html>`_), or horizontal bar charts -(`barh.py <../examples/lines_bars_and_markers/plot_barh.html>`_). +(`barh.py <../examples/lines_bars_and_markers/barh.html>`_). .. _screenshots_pie_demo: