From 501571bd1bf1e93bea08e12106e6fca0ac8c1b97 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Wed, 14 Feb 2018 17:23:52 +0000 Subject: [PATCH 1/2] Move some examples out of examples/api Fix some doc links Put back AGG OO example Remove old example --- examples/{api => color}/colorbar_basics.py | 0 examples/{api => images_contours_and_fields}/affine_image.py | 0 examples/{api => lines_bars_and_markers}/barchart.py | 0 examples/{api => misc}/bbox_intersect.py | 0 .../custom_projection.py} | 0 .../{api/custom_scale_example.py => scales/custom_scale.py} | 0 examples/{api => shapes_and_collections}/collections.py | 0 examples/{api => shapes_and_collections}/compound_path.py | 0 examples/{api => shapes_and_collections}/donut.py | 0 examples/{api => subplots_axes_and_figures}/axes_margins.py | 0 examples/{api => text_labels_and_annotations}/date.py | 0 .../date_index_formatter.py} | 1 + .../engineering_formatter.py | 0 examples/units/bar_unit_demo.py | 4 ++-- tutorials/advanced/transforms_tutorial.py | 2 +- tutorials/introductory/sample_plots.py | 4 ++-- 16 files changed, 6 insertions(+), 5 deletions(-) rename examples/{api => color}/colorbar_basics.py (100%) rename examples/{api => images_contours_and_fields}/affine_image.py (100%) rename examples/{api => lines_bars_and_markers}/barchart.py (100%) rename examples/{api => misc}/bbox_intersect.py (100%) rename examples/{api/custom_projection_example.py => misc/custom_projection.py} (100%) rename examples/{api/custom_scale_example.py => scales/custom_scale.py} (100%) rename examples/{api => shapes_and_collections}/collections.py (100%) rename examples/{api => shapes_and_collections}/compound_path.py (100%) rename examples/{api => shapes_and_collections}/donut.py (100%) rename examples/{api => subplots_axes_and_figures}/axes_margins.py (100%) rename examples/{api => text_labels_and_annotations}/date.py (100%) rename examples/{api/custom_index_formatter.py => text_labels_and_annotations/date_index_formatter.py} (97%) rename examples/{api => text_labels_and_annotations}/engineering_formatter.py (100%) diff --git a/examples/api/colorbar_basics.py b/examples/color/colorbar_basics.py similarity index 100% rename from examples/api/colorbar_basics.py rename to examples/color/colorbar_basics.py diff --git a/examples/api/affine_image.py b/examples/images_contours_and_fields/affine_image.py similarity index 100% rename from examples/api/affine_image.py rename to examples/images_contours_and_fields/affine_image.py diff --git a/examples/api/barchart.py b/examples/lines_bars_and_markers/barchart.py similarity index 100% rename from examples/api/barchart.py rename to examples/lines_bars_and_markers/barchart.py diff --git a/examples/api/bbox_intersect.py b/examples/misc/bbox_intersect.py similarity index 100% rename from examples/api/bbox_intersect.py rename to examples/misc/bbox_intersect.py diff --git a/examples/api/custom_projection_example.py b/examples/misc/custom_projection.py similarity index 100% rename from examples/api/custom_projection_example.py rename to examples/misc/custom_projection.py diff --git a/examples/api/custom_scale_example.py b/examples/scales/custom_scale.py similarity index 100% rename from examples/api/custom_scale_example.py rename to examples/scales/custom_scale.py diff --git a/examples/api/collections.py b/examples/shapes_and_collections/collections.py similarity index 100% rename from examples/api/collections.py rename to examples/shapes_and_collections/collections.py diff --git a/examples/api/compound_path.py b/examples/shapes_and_collections/compound_path.py similarity index 100% rename from examples/api/compound_path.py rename to examples/shapes_and_collections/compound_path.py diff --git a/examples/api/donut.py b/examples/shapes_and_collections/donut.py similarity index 100% rename from examples/api/donut.py rename to examples/shapes_and_collections/donut.py diff --git a/examples/api/axes_margins.py b/examples/subplots_axes_and_figures/axes_margins.py similarity index 100% rename from examples/api/axes_margins.py rename to examples/subplots_axes_and_figures/axes_margins.py diff --git a/examples/api/date.py b/examples/text_labels_and_annotations/date.py similarity index 100% rename from examples/api/date.py rename to examples/text_labels_and_annotations/date.py diff --git a/examples/api/custom_index_formatter.py b/examples/text_labels_and_annotations/date_index_formatter.py similarity index 97% rename from examples/api/custom_index_formatter.py rename to examples/text_labels_and_annotations/date_index_formatter.py index 389fd2e0353e..9e117dd91c8d 100644 --- a/examples/api/custom_index_formatter.py +++ b/examples/text_labels_and_annotations/date_index_formatter.py @@ -7,6 +7,7 @@ to leave out days on which there is no data, i.e. weekends. The example below shows how to use an 'index formatter' to achieve the desired plot """ +from __future__ import print_function import numpy as np import matplotlib.pyplot as plt import matplotlib.cbook as cbook diff --git a/examples/api/engineering_formatter.py b/examples/text_labels_and_annotations/engineering_formatter.py similarity index 100% rename from examples/api/engineering_formatter.py rename to examples/text_labels_and_annotations/engineering_formatter.py diff --git a/examples/units/bar_unit_demo.py b/examples/units/bar_unit_demo.py index a4f0bdf17612..d8f77e4ee3d0 100644 --- a/examples/units/bar_unit_demo.py +++ b/examples/units/bar_unit_demo.py @@ -3,8 +3,8 @@ Group barchart with units ========================= -This is the same example as :doc:`the barchart demo<../api/barchart>` -in centimeters. +This is the same example as +:doc:`the barchart demo<../lines_bars_and_markers/barchart>` in centimeters. .. only:: builder_html diff --git a/tutorials/advanced/transforms_tutorial.py b/tutorials/advanced/transforms_tutorial.py index 5091bdfabc3b..8d090ae3e62a 100644 --- a/tutorials/advanced/transforms_tutorial.py +++ b/tutorials/advanced/transforms_tutorial.py @@ -467,4 +467,4 @@ # 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:`sphx_glr_gallery_api_custom_projection_example.py`. +# :ref:`sphx_glr_gallery_misc_custom_projection.py`. diff --git a/tutorials/introductory/sample_plots.py b/tutorials/introductory/sample_plots.py index edd2beb4bab3..22738f2291c8 100644 --- a/tutorials/introductory/sample_plots.py +++ b/tutorials/introductory/sample_plots.py @@ -279,8 +279,8 @@ You can plot timeseries data with major and minor ticks and custom tick formatters for both. -.. figure:: ../../gallery/api/images/sphx_glr_date_001.png - :target: ../../gallery/api/date.html +.. figure:: ../../gallery/text_labels_and_annotations/images/sphx_glr_date_001.png + :target: ../../gallery/text_labels_and_annotations/date.html :align: center :scale: 50 From 791a20c65d3644ce77bb1ac050360a7b995a06cc Mon Sep 17 00:00:00 2001 From: David Stansby Date: Wed, 28 Mar 2018 08:34:58 +0100 Subject: [PATCH 2/2] Remove future print --- examples/text_labels_and_annotations/date_index_formatter.py | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/text_labels_and_annotations/date_index_formatter.py b/examples/text_labels_and_annotations/date_index_formatter.py index 9e117dd91c8d..389fd2e0353e 100644 --- a/examples/text_labels_and_annotations/date_index_formatter.py +++ b/examples/text_labels_and_annotations/date_index_formatter.py @@ -7,7 +7,6 @@ to leave out days on which there is no data, i.e. weekends. The example below shows how to use an 'index formatter' to achieve the desired plot """ -from __future__ import print_function import numpy as np import matplotlib.pyplot as plt import matplotlib.cbook as cbook