diff --git a/_images/2dcollections3d_demo.png b/_images/2dcollections3d_demo.png
deleted file mode 100644
index 556b3289f4a..00000000000
Binary files a/_images/2dcollections3d_demo.png and /dev/null differ
diff --git a/_images/2dcollections3d_demo1.png b/_images/2dcollections3d_demo1.png
deleted file mode 100644
index 556b3289f4a..00000000000
Binary files a/_images/2dcollections3d_demo1.png and /dev/null differ
diff --git a/_images/accented_text.png b/_images/accented_text.png
deleted file mode 100644
index 7e1cf1b65da..00000000000
Binary files a/_images/accented_text.png and /dev/null differ
diff --git a/_images/advanced_hillshading_00.png b/_images/advanced_hillshading_00.png
deleted file mode 100644
index 8f05f783c27..00000000000
Binary files a/_images/advanced_hillshading_00.png and /dev/null differ
diff --git a/_images/advanced_hillshading_01.png b/_images/advanced_hillshading_01.png
deleted file mode 100644
index 0f1a55a2b9d..00000000000
Binary files a/_images/advanced_hillshading_01.png and /dev/null differ
diff --git a/_images/advanced_hillshading_02.png b/_images/advanced_hillshading_02.png
deleted file mode 100644
index 50c192ef740..00000000000
Binary files a/_images/advanced_hillshading_02.png and /dev/null differ
diff --git a/_images/agg_buffer.png b/_images/agg_buffer.png
deleted file mode 100644
index ed310997139..00000000000
Binary files a/_images/agg_buffer.png and /dev/null differ
diff --git a/_images/agg_buffer_to_array_00.png b/_images/agg_buffer_to_array_00.png
deleted file mode 100644
index 8b5bf2e0d1b..00000000000
Binary files a/_images/agg_buffer_to_array_00.png and /dev/null differ
diff --git a/_images/agg_buffer_to_array_01.png b/_images/agg_buffer_to_array_01.png
deleted file mode 100644
index b3df5233d78..00000000000
Binary files a/_images/agg_buffer_to_array_01.png and /dev/null differ
diff --git a/_images/align_ylabels.png b/_images/align_ylabels.png
deleted file mode 100644
index f29437dd200..00000000000
Binary files a/_images/align_ylabels.png and /dev/null differ
diff --git a/_images/alignment_test.png b/_images/alignment_test.png
deleted file mode 100644
index 93e76a1ce8b..00000000000
Binary files a/_images/alignment_test.png and /dev/null differ
diff --git a/_images/anatomy1.png b/_images/anatomy1.png
deleted file mode 100644
index d3054395b06..00000000000
Binary files a/_images/anatomy1.png and /dev/null differ
diff --git a/_images/anchored_artists.png b/_images/anchored_artists.png
deleted file mode 100644
index 851c16ae8ca..00000000000
Binary files a/_images/anchored_artists.png and /dev/null differ
diff --git a/_images/anchored_box01.png b/_images/anchored_box01.png
deleted file mode 100644
index 199bf9de10c..00000000000
Binary files a/_images/anchored_box01.png and /dev/null differ
diff --git a/_images/anchored_box02.png b/_images/anchored_box02.png
deleted file mode 100644
index 8fbc9105ef8..00000000000
Binary files a/_images/anchored_box02.png and /dev/null differ
diff --git a/_images/anchored_box03.png b/_images/anchored_box03.png
deleted file mode 100644
index f48ba93cd77..00000000000
Binary files a/_images/anchored_box03.png and /dev/null differ
diff --git a/_images/anchored_box04.png b/_images/anchored_box04.png
deleted file mode 100644
index 36ff1cad4fe..00000000000
Binary files a/_images/anchored_box04.png and /dev/null differ
diff --git a/_images/animation_demo.png b/_images/animation_demo.png
deleted file mode 100644
index b6a6bbdc8b5..00000000000
Binary files a/_images/animation_demo.png and /dev/null differ
diff --git a/_images/annotate_explain.png b/_images/annotate_explain.png
deleted file mode 100644
index 4c5191e227e..00000000000
Binary files a/_images/annotate_explain.png and /dev/null differ
diff --git a/_images/annotate_simple01.png b/_images/annotate_simple01.png
deleted file mode 100644
index 70ecc28c64b..00000000000
Binary files a/_images/annotate_simple01.png and /dev/null differ
diff --git a/_images/annotate_simple02.png b/_images/annotate_simple02.png
deleted file mode 100644
index 497efbbfd21..00000000000
Binary files a/_images/annotate_simple02.png and /dev/null differ
diff --git a/_images/annotate_simple03.png b/_images/annotate_simple03.png
deleted file mode 100644
index 39e697abd39..00000000000
Binary files a/_images/annotate_simple03.png and /dev/null differ
diff --git a/_images/annotate_simple04.png b/_images/annotate_simple04.png
deleted file mode 100644
index 3fbd0dd9bc5..00000000000
Binary files a/_images/annotate_simple04.png and /dev/null differ
diff --git a/_images/annotate_simple_coord01.png b/_images/annotate_simple_coord01.png
deleted file mode 100644
index 6c4b91afbfc..00000000000
Binary files a/_images/annotate_simple_coord01.png and /dev/null differ
diff --git a/_images/annotate_simple_coord02.png b/_images/annotate_simple_coord02.png
deleted file mode 100644
index 958901ee774..00000000000
Binary files a/_images/annotate_simple_coord02.png and /dev/null differ
diff --git a/_images/annotate_simple_coord03.png b/_images/annotate_simple_coord03.png
deleted file mode 100644
index eba450874c2..00000000000
Binary files a/_images/annotate_simple_coord03.png and /dev/null differ
diff --git a/_images/annotate_text_arrow.png b/_images/annotate_text_arrow.png
deleted file mode 100644
index 09d2fda32a6..00000000000
Binary files a/_images/annotate_text_arrow.png and /dev/null differ
diff --git a/_images/annotate_transform.png b/_images/annotate_transform.png
deleted file mode 100644
index 2c6c8e05f4f..00000000000
Binary files a/_images/annotate_transform.png and /dev/null differ
diff --git a/_images/annotate_with_units.png b/_images/annotate_with_units.png
deleted file mode 100644
index cdc676e0c77..00000000000
Binary files a/_images/annotate_with_units.png and /dev/null differ
diff --git a/_images/annotation_basic.png b/_images/annotation_basic.png
deleted file mode 100644
index 18c5e2b254d..00000000000
Binary files a/_images/annotation_basic.png and /dev/null differ
diff --git a/_images/annotation_demo2_00.png b/_images/annotation_demo2_00.png
deleted file mode 100644
index c4bb5a01784..00000000000
Binary files a/_images/annotation_demo2_00.png and /dev/null differ
diff --git a/_images/annotation_demo2_01.png b/_images/annotation_demo2_01.png
deleted file mode 100644
index 0f7bcd31cb7..00000000000
Binary files a/_images/annotation_demo2_01.png and /dev/null differ
diff --git a/_images/annotation_demo3.png b/_images/annotation_demo3.png
deleted file mode 100644
index 64a588fb366..00000000000
Binary files a/_images/annotation_demo3.png and /dev/null differ
diff --git a/_images/annotation_demo_00.png b/_images/annotation_demo_00.png
deleted file mode 100644
index 7d7d905f932..00000000000
Binary files a/_images/annotation_demo_00.png and /dev/null differ
diff --git a/_images/annotation_demo_01.png b/_images/annotation_demo_01.png
deleted file mode 100644
index afe2eeb7e1d..00000000000
Binary files a/_images/annotation_demo_01.png and /dev/null differ
diff --git a/_images/annotation_demo_02.png b/_images/annotation_demo_02.png
deleted file mode 100644
index 3b6e5bd8244..00000000000
Binary files a/_images/annotation_demo_02.png and /dev/null differ
diff --git a/_images/annotation_polar.png b/_images/annotation_polar.png
deleted file mode 100644
index dc70de10be6..00000000000
Binary files a/_images/annotation_polar.png and /dev/null differ
diff --git a/_images/anscombe.png b/_images/anscombe.png
deleted file mode 100644
index 69e0c88ab64..00000000000
Binary files a/_images/anscombe.png and /dev/null differ
diff --git a/_images/arctest.png b/_images/arctest.png
deleted file mode 100644
index 9e1cb035a2f..00000000000
Binary files a/_images/arctest.png and /dev/null differ
diff --git a/_images/arrow_demo.png b/_images/arrow_demo.png
deleted file mode 100644
index c124b7799c6..00000000000
Binary files a/_images/arrow_demo.png and /dev/null differ
diff --git a/_images/arrow_demo1.png b/_images/arrow_demo1.png
deleted file mode 100644
index c124b7799c6..00000000000
Binary files a/_images/arrow_demo1.png and /dev/null differ
diff --git a/_images/arrow_demo2.png b/_images/arrow_demo2.png
deleted file mode 100644
index c124b7799c6..00000000000
Binary files a/_images/arrow_demo2.png and /dev/null differ
diff --git a/_images/arrow_simple_demo.png b/_images/arrow_simple_demo.png
deleted file mode 100644
index 3abe4f341f7..00000000000
Binary files a/_images/arrow_simple_demo.png and /dev/null differ
diff --git a/_images/artist_reference.png b/_images/artist_reference.png
deleted file mode 100644
index 9822e5c5c99..00000000000
Binary files a/_images/artist_reference.png and /dev/null differ
diff --git a/_images/artist_tests.png b/_images/artist_tests.png
deleted file mode 100644
index 3ce2f52d4b4..00000000000
Binary files a/_images/artist_tests.png and /dev/null differ
diff --git a/_images/aspect_loglog.png b/_images/aspect_loglog.png
deleted file mode 100644
index 6e8041bdba0..00000000000
Binary files a/_images/aspect_loglog.png and /dev/null differ
diff --git a/_images/auto_subplots_adjust.png b/_images/auto_subplots_adjust.png
deleted file mode 100644
index d0574d2ac6b..00000000000
Binary files a/_images/auto_subplots_adjust.png and /dev/null differ
diff --git a/_images/autowrap_demo.png b/_images/autowrap_demo.png
deleted file mode 100644
index 2a31993d174..00000000000
Binary files a/_images/autowrap_demo.png and /dev/null differ
diff --git a/_images/axes_demo.png b/_images/axes_demo.png
deleted file mode 100644
index 1bf7252195e..00000000000
Binary files a/_images/axes_demo.png and /dev/null differ
diff --git a/_images/axes_props.png b/_images/axes_props.png
deleted file mode 100644
index cb396147b70..00000000000
Binary files a/_images/axes_props.png and /dev/null differ
diff --git a/_images/axes_zoom_effect.png b/_images/axes_zoom_effect.png
deleted file mode 100644
index dcc7443268e..00000000000
Binary files a/_images/axes_zoom_effect.png and /dev/null differ
diff --git a/_images/axes_zoom_effect1.png b/_images/axes_zoom_effect1.png
deleted file mode 100644
index dcc7443268e..00000000000
Binary files a/_images/axes_zoom_effect1.png and /dev/null differ
diff --git a/_images/axhspan_demo.png b/_images/axhspan_demo.png
deleted file mode 100644
index 972c3222fba..00000000000
Binary files a/_images/axhspan_demo.png and /dev/null differ
diff --git a/_images/axhspan_demo1.png b/_images/axhspan_demo1.png
deleted file mode 100644
index 972c3222fba..00000000000
Binary files a/_images/axhspan_demo1.png and /dev/null differ
diff --git a/_images/axhspan_demo2.png b/_images/axhspan_demo2.png
deleted file mode 100644
index 972c3222fba..00000000000
Binary files a/_images/axhspan_demo2.png and /dev/null differ
diff --git a/_images/axis_direction_demo_step01.png b/_images/axis_direction_demo_step01.png
deleted file mode 100644
index 3a2a28b3c3c..00000000000
Binary files a/_images/axis_direction_demo_step01.png and /dev/null differ
diff --git a/_images/axis_direction_demo_step02.png b/_images/axis_direction_demo_step02.png
deleted file mode 100644
index da51f77f9be..00000000000
Binary files a/_images/axis_direction_demo_step02.png and /dev/null differ
diff --git a/_images/axis_direction_demo_step03.png b/_images/axis_direction_demo_step03.png
deleted file mode 100644
index 2c27c2d24dc..00000000000
Binary files a/_images/axis_direction_demo_step03.png and /dev/null differ
diff --git a/_images/axis_direction_demo_step04.png b/_images/axis_direction_demo_step04.png
deleted file mode 100644
index e89ce93d901..00000000000
Binary files a/_images/axis_direction_demo_step04.png and /dev/null differ
diff --git a/_images/axis_equal_demo.png b/_images/axis_equal_demo.png
deleted file mode 100644
index 236cfc81dd5..00000000000
Binary files a/_images/axis_equal_demo.png and /dev/null differ
diff --git a/_images/bachelors_degrees_by_gender.png b/_images/bachelors_degrees_by_gender.png
deleted file mode 100644
index f9420278f2e..00000000000
Binary files a/_images/bachelors_degrees_by_gender.png and /dev/null differ
diff --git a/_images/bar_demo2.png b/_images/bar_demo2.png
deleted file mode 100644
index 2d0bb411a16..00000000000
Binary files a/_images/bar_demo2.png and /dev/null differ
diff --git a/_images/bar_stacked.png b/_images/bar_stacked.png
deleted file mode 100644
index f441b434871..00000000000
Binary files a/_images/bar_stacked.png and /dev/null differ
diff --git a/_images/bar_stacked1.png b/_images/bar_stacked1.png
deleted file mode 100644
index f441b434871..00000000000
Binary files a/_images/bar_stacked1.png and /dev/null differ
diff --git a/_images/bar_stacked2.png b/_images/bar_stacked2.png
deleted file mode 100644
index f441b434871..00000000000
Binary files a/_images/bar_stacked2.png and /dev/null differ
diff --git a/_images/bar_unit_demo.png b/_images/bar_unit_demo.png
deleted file mode 100644
index 5ac478ffd38..00000000000
Binary files a/_images/bar_unit_demo.png and /dev/null differ
diff --git a/_images/barb_demo_00.png b/_images/barb_demo_00.png
deleted file mode 100644
index 1fc7fc7767f..00000000000
Binary files a/_images/barb_demo_00.png and /dev/null differ
diff --git a/_images/barb_demo_001.png b/_images/barb_demo_001.png
deleted file mode 100644
index 1fc7fc7767f..00000000000
Binary files a/_images/barb_demo_001.png and /dev/null differ
diff --git a/_images/barb_demo_002.png b/_images/barb_demo_002.png
deleted file mode 100644
index 1fc7fc7767f..00000000000
Binary files a/_images/barb_demo_002.png and /dev/null differ
diff --git a/_images/barb_demo_01.png b/_images/barb_demo_01.png
deleted file mode 100644
index 499d9aed4ba..00000000000
Binary files a/_images/barb_demo_01.png and /dev/null differ
diff --git a/_images/barb_demo_011.png b/_images/barb_demo_011.png
deleted file mode 100644
index 499d9aed4ba..00000000000
Binary files a/_images/barb_demo_011.png and /dev/null differ
diff --git a/_images/barb_demo_012.png b/_images/barb_demo_012.png
deleted file mode 100644
index 499d9aed4ba..00000000000
Binary files a/_images/barb_demo_012.png and /dev/null differ
diff --git a/_images/barchart_demo.png b/_images/barchart_demo.png
deleted file mode 100644
index ec1bb95d6eb..00000000000
Binary files a/_images/barchart_demo.png and /dev/null differ
diff --git a/_images/barchart_demo1.png b/_images/barchart_demo1.png
deleted file mode 100644
index 7452e8793d9..00000000000
Binary files a/_images/barchart_demo1.png and /dev/null differ
diff --git a/_images/barchart_demo2.png b/_images/barchart_demo2.png
deleted file mode 100644
index c44e573df28..00000000000
Binary files a/_images/barchart_demo2.png and /dev/null differ
diff --git a/_images/barchart_demo3.png b/_images/barchart_demo3.png
deleted file mode 100644
index ec1bb95d6eb..00000000000
Binary files a/_images/barchart_demo3.png and /dev/null differ
diff --git a/_images/barcode_demo.png b/_images/barcode_demo.png
deleted file mode 100644
index b61ca7c3072..00000000000
Binary files a/_images/barcode_demo.png and /dev/null differ
diff --git a/_images/barh_demo.png b/_images/barh_demo.png
deleted file mode 100644
index 9a1bfdee746..00000000000
Binary files a/_images/barh_demo.png and /dev/null differ
diff --git a/_images/bars3d_demo.png b/_images/bars3d_demo.png
deleted file mode 100644
index a3217a22299..00000000000
Binary files a/_images/bars3d_demo.png and /dev/null differ
diff --git a/_images/bars3d_demo1.png b/_images/bars3d_demo1.png
deleted file mode 100644
index a3217a22299..00000000000
Binary files a/_images/bars3d_demo1.png and /dev/null differ
diff --git a/_images/bbox_intersect.png b/_images/bbox_intersect.png
deleted file mode 100644
index bb9b7dc5e9d..00000000000
Binary files a/_images/bbox_intersect.png and /dev/null differ
diff --git a/_images/boxplot_color_demo.png b/_images/boxplot_color_demo.png
deleted file mode 100644
index 7b5568fbc62..00000000000
Binary files a/_images/boxplot_color_demo.png and /dev/null differ
diff --git a/_images/boxplot_demo2.png b/_images/boxplot_demo2.png
deleted file mode 100644
index cd7f31cc400..00000000000
Binary files a/_images/boxplot_demo2.png and /dev/null differ
diff --git a/_images/boxplot_demo3.png b/_images/boxplot_demo3.png
deleted file mode 100644
index c08534722cc..00000000000
Binary files a/_images/boxplot_demo3.png and /dev/null differ
diff --git a/_images/boxplot_demo31.png b/_images/boxplot_demo31.png
deleted file mode 100644
index c08534722cc..00000000000
Binary files a/_images/boxplot_demo31.png and /dev/null differ
diff --git a/_images/boxplot_demo_00.png b/_images/boxplot_demo_00.png
deleted file mode 100644
index a1b649e4f50..00000000000
Binary files a/_images/boxplot_demo_00.png and /dev/null differ
diff --git a/_images/boxplot_demo_00_00.png b/_images/boxplot_demo_00_00.png
deleted file mode 100644
index 7d7b66eb9bb..00000000000
Binary files a/_images/boxplot_demo_00_00.png and /dev/null differ
diff --git a/_images/boxplot_demo_00_001.png b/_images/boxplot_demo_00_001.png
deleted file mode 100644
index 7d7b66eb9bb..00000000000
Binary files a/_images/boxplot_demo_00_001.png and /dev/null differ
diff --git a/_images/boxplot_demo_00_002.png b/_images/boxplot_demo_00_002.png
deleted file mode 100644
index 7d7b66eb9bb..00000000000
Binary files a/_images/boxplot_demo_00_002.png and /dev/null differ
diff --git a/_images/boxplot_demo_01.png b/_images/boxplot_demo_01.png
deleted file mode 100644
index da6f5a8031a..00000000000
Binary files a/_images/boxplot_demo_01.png and /dev/null differ
diff --git a/_images/boxplot_demo_01_00.png b/_images/boxplot_demo_01_00.png
deleted file mode 100644
index 6d53f972110..00000000000
Binary files a/_images/boxplot_demo_01_00.png and /dev/null differ
diff --git a/_images/boxplot_demo_01_001.png b/_images/boxplot_demo_01_001.png
deleted file mode 100644
index 6d53f972110..00000000000
Binary files a/_images/boxplot_demo_01_001.png and /dev/null differ
diff --git a/_images/boxplot_demo_01_002.png b/_images/boxplot_demo_01_002.png
deleted file mode 100644
index 6d53f972110..00000000000
Binary files a/_images/boxplot_demo_01_002.png and /dev/null differ
diff --git a/_images/boxplot_demo_02.png b/_images/boxplot_demo_02.png
deleted file mode 100644
index e56e4f5bed9..00000000000
Binary files a/_images/boxplot_demo_02.png and /dev/null differ
diff --git a/_images/boxplot_demo_03.png b/_images/boxplot_demo_03.png
deleted file mode 100644
index 0be74035047..00000000000
Binary files a/_images/boxplot_demo_03.png and /dev/null differ
diff --git a/_images/boxplot_demo_04.png b/_images/boxplot_demo_04.png
deleted file mode 100644
index 55220b7334d..00000000000
Binary files a/_images/boxplot_demo_04.png and /dev/null differ
diff --git a/_images/boxplot_demo_05.png b/_images/boxplot_demo_05.png
deleted file mode 100644
index 56660dada52..00000000000
Binary files a/_images/boxplot_demo_05.png and /dev/null differ
diff --git a/_images/boxplot_demo_06.png b/_images/boxplot_demo_06.png
deleted file mode 100644
index 58c57564321..00000000000
Binary files a/_images/boxplot_demo_06.png and /dev/null differ
diff --git a/_images/boxplot_vs_violin_demo.png b/_images/boxplot_vs_violin_demo.png
deleted file mode 100644
index 495489bd78b..00000000000
Binary files a/_images/boxplot_vs_violin_demo.png and /dev/null differ
diff --git a/_images/broken_axis.png b/_images/broken_axis.png
deleted file mode 100644
index 06baf095834..00000000000
Binary files a/_images/broken_axis.png and /dev/null differ
diff --git a/_images/broken_barh.png b/_images/broken_barh.png
deleted file mode 100644
index 62170ee03a2..00000000000
Binary files a/_images/broken_barh.png and /dev/null differ
diff --git a/_images/broken_barh1.png b/_images/broken_barh1.png
deleted file mode 100644
index 62170ee03a2..00000000000
Binary files a/_images/broken_barh1.png and /dev/null differ
diff --git a/_images/broken_barh2.png b/_images/broken_barh2.png
deleted file mode 100644
index 62170ee03a2..00000000000
Binary files a/_images/broken_barh2.png and /dev/null differ
diff --git a/_images/bxp_demo_00_00.png b/_images/bxp_demo_00_00.png
deleted file mode 100644
index 9b07e4ba31b..00000000000
Binary files a/_images/bxp_demo_00_00.png and /dev/null differ
diff --git a/_images/bxp_demo_00_001.png b/_images/bxp_demo_00_001.png
deleted file mode 100644
index 9b07e4ba31b..00000000000
Binary files a/_images/bxp_demo_00_001.png and /dev/null differ
diff --git a/_images/bxp_demo_01_00.png b/_images/bxp_demo_01_00.png
deleted file mode 100644
index 3e9d019ed4b..00000000000
Binary files a/_images/bxp_demo_01_00.png and /dev/null differ
diff --git a/_images/bxp_demo_01_001.png b/_images/bxp_demo_01_001.png
deleted file mode 100644
index 3e9d019ed4b..00000000000
Binary files a/_images/bxp_demo_01_001.png and /dev/null differ
diff --git a/_images/centered_ticklabels.png b/_images/centered_ticklabels.png
deleted file mode 100644
index 6938d8c6ca8..00000000000
Binary files a/_images/centered_ticklabels.png and /dev/null differ
diff --git a/_images/cohere_demo.png b/_images/cohere_demo.png
deleted file mode 100644
index fc5f15cdbb9..00000000000
Binary files a/_images/cohere_demo.png and /dev/null differ
diff --git a/_images/cohere_demo1.png b/_images/cohere_demo1.png
deleted file mode 100644
index fc5f15cdbb9..00000000000
Binary files a/_images/cohere_demo1.png and /dev/null differ
diff --git a/_images/cohere_demo2.png b/_images/cohere_demo2.png
deleted file mode 100644
index fc5f15cdbb9..00000000000
Binary files a/_images/cohere_demo2.png and /dev/null differ
diff --git a/_images/collections_demo.png b/_images/collections_demo.png
deleted file mode 100644
index 16642feb82b..00000000000
Binary files a/_images/collections_demo.png and /dev/null differ
diff --git a/_images/color_by_yvalue.png b/_images/color_by_yvalue.png
deleted file mode 100644
index 9f570070d5c..00000000000
Binary files a/_images/color_by_yvalue.png and /dev/null differ
diff --git a/_images/color_cycle_default.png b/_images/color_cycle_default.png
deleted file mode 100644
index e9621044adf..00000000000
Binary files a/_images/color_cycle_default.png and /dev/null differ
diff --git a/_images/color_cycle_demo.png b/_images/color_cycle_demo.png
deleted file mode 100644
index d8030cea036..00000000000
Binary files a/_images/color_cycle_demo.png and /dev/null differ
diff --git a/_images/color_cycle_demo1.png b/_images/color_cycle_demo1.png
deleted file mode 100644
index d8030cea036..00000000000
Binary files a/_images/color_cycle_demo1.png and /dev/null differ
diff --git a/_images/color_demo.png b/_images/color_demo.png
deleted file mode 100644
index 8d66794f59a..00000000000
Binary files a/_images/color_demo.png and /dev/null differ
diff --git a/_images/colorbar_basics.png b/_images/colorbar_basics.png
deleted file mode 100644
index 5ef231da58e..00000000000
Binary files a/_images/colorbar_basics.png and /dev/null differ
diff --git a/_images/colorbar_only.png b/_images/colorbar_only.png
deleted file mode 100644
index 6cc20cd1a9e..00000000000
Binary files a/_images/colorbar_only.png and /dev/null differ
diff --git a/_images/colorbar_tick_labelling_demo_00.png b/_images/colorbar_tick_labelling_demo_00.png
deleted file mode 100644
index 9e0e5ca7892..00000000000
Binary files a/_images/colorbar_tick_labelling_demo_00.png and /dev/null differ
diff --git a/_images/colorbar_tick_labelling_demo_01.png b/_images/colorbar_tick_labelling_demo_01.png
deleted file mode 100644
index e5490675901..00000000000
Binary files a/_images/colorbar_tick_labelling_demo_01.png and /dev/null differ
diff --git a/_images/colormap_normalizations_bounds.png b/_images/colormap_normalizations_bounds.png
deleted file mode 100644
index 7fc5d78c02b..00000000000
Binary files a/_images/colormap_normalizations_bounds.png and /dev/null differ
diff --git a/_images/colormap_normalizations_custom.png b/_images/colormap_normalizations_custom.png
deleted file mode 100644
index fb55ca580dc..00000000000
Binary files a/_images/colormap_normalizations_custom.png and /dev/null differ
diff --git a/_images/colormap_normalizations_lognorm.png b/_images/colormap_normalizations_lognorm.png
deleted file mode 100644
index 0ab10a105e2..00000000000
Binary files a/_images/colormap_normalizations_lognorm.png and /dev/null differ
diff --git a/_images/colormap_normalizations_power.png b/_images/colormap_normalizations_power.png
deleted file mode 100644
index 03d84bad71d..00000000000
Binary files a/_images/colormap_normalizations_power.png and /dev/null differ
diff --git a/_images/colormap_normalizations_symlognorm.png b/_images/colormap_normalizations_symlognorm.png
deleted file mode 100644
index 812f4b7be9a..00000000000
Binary files a/_images/colormap_normalizations_symlognorm.png and /dev/null differ
diff --git a/_images/colormaps_reference_00.png b/_images/colormaps_reference_00.png
deleted file mode 100644
index ef698994560..00000000000
Binary files a/_images/colormaps_reference_00.png and /dev/null differ
diff --git a/_images/colormaps_reference_01.png b/_images/colormaps_reference_01.png
deleted file mode 100644
index d5fb54a34da..00000000000
Binary files a/_images/colormaps_reference_01.png and /dev/null differ
diff --git a/_images/colormaps_reference_02.png b/_images/colormaps_reference_02.png
deleted file mode 100644
index 54e76b9b48b..00000000000
Binary files a/_images/colormaps_reference_02.png and /dev/null differ
diff --git a/_images/colormaps_reference_03.png b/_images/colormaps_reference_03.png
deleted file mode 100644
index a7c6d1fd819..00000000000
Binary files a/_images/colormaps_reference_03.png and /dev/null differ
diff --git a/_images/colormaps_reference_04.png b/_images/colormaps_reference_04.png
deleted file mode 100644
index 1b1b4b84f1e..00000000000
Binary files a/_images/colormaps_reference_04.png and /dev/null differ
diff --git a/_images/colormaps_reference_05.png b/_images/colormaps_reference_05.png
deleted file mode 100644
index 8ca7eaf1484..00000000000
Binary files a/_images/colormaps_reference_05.png and /dev/null differ
diff --git a/_images/colors-1_00.png b/_images/colors-1_00.png
deleted file mode 100644
index 3c7c773d035..00000000000
Binary files a/_images/colors-1_00.png and /dev/null differ
diff --git a/_images/colors-1_01.png b/_images/colors-1_01.png
deleted file mode 100644
index c7cb3cb1654..00000000000
Binary files a/_images/colors-1_01.png and /dev/null differ
diff --git a/_images/colors-2.png b/_images/colors-2.png
deleted file mode 100644
index 208ab714262..00000000000
Binary files a/_images/colors-2.png and /dev/null differ
diff --git a/_images/compound_path.png b/_images/compound_path.png
deleted file mode 100644
index fd499004146..00000000000
Binary files a/_images/compound_path.png and /dev/null differ
diff --git a/_images/compound_path_demo.png b/_images/compound_path_demo.png
deleted file mode 100644
index d0e53b7ee99..00000000000
Binary files a/_images/compound_path_demo.png and /dev/null differ
diff --git a/_images/connect_simple01.png b/_images/connect_simple01.png
deleted file mode 100644
index 4ab97e74ae2..00000000000
Binary files a/_images/connect_simple01.png and /dev/null differ
diff --git a/_images/connectionstyle_demo.png b/_images/connectionstyle_demo.png
deleted file mode 100644
index 71d1bf4f4e6..00000000000
Binary files a/_images/connectionstyle_demo.png and /dev/null differ
diff --git a/_images/contour3d_demo.png b/_images/contour3d_demo.png
deleted file mode 100644
index 269c68d9e95..00000000000
Binary files a/_images/contour3d_demo.png and /dev/null differ
diff --git a/_images/contour3d_demo1.png b/_images/contour3d_demo1.png
deleted file mode 100644
index 269c68d9e95..00000000000
Binary files a/_images/contour3d_demo1.png and /dev/null differ
diff --git a/_images/contour3d_demo2.png b/_images/contour3d_demo2.png
deleted file mode 100644
index 867b4dee279..00000000000
Binary files a/_images/contour3d_demo2.png and /dev/null differ
diff --git a/_images/contour3d_demo21.png b/_images/contour3d_demo21.png
deleted file mode 100644
index 867b4dee279..00000000000
Binary files a/_images/contour3d_demo21.png and /dev/null differ
diff --git a/_images/contour3d_demo3.png b/_images/contour3d_demo3.png
deleted file mode 100644
index 6650c6f592f..00000000000
Binary files a/_images/contour3d_demo3.png and /dev/null differ
diff --git a/_images/contour3d_demo31.png b/_images/contour3d_demo31.png
deleted file mode 100644
index 6650c6f592f..00000000000
Binary files a/_images/contour3d_demo31.png and /dev/null differ
diff --git a/_images/contour_corner_mask.png b/_images/contour_corner_mask.png
deleted file mode 100644
index b0e3f741cdd..00000000000
Binary files a/_images/contour_corner_mask.png and /dev/null differ
diff --git a/_images/contour_corner_mask1.png b/_images/contour_corner_mask1.png
deleted file mode 100644
index b0e3f741cdd..00000000000
Binary files a/_images/contour_corner_mask1.png and /dev/null differ
diff --git a/_images/contour_corner_mask2.png b/_images/contour_corner_mask2.png
deleted file mode 100644
index b0e3f741cdd..00000000000
Binary files a/_images/contour_corner_mask2.png and /dev/null differ
diff --git a/_images/contour_corner_mask3.png b/_images/contour_corner_mask3.png
deleted file mode 100644
index b0e3f741cdd..00000000000
Binary files a/_images/contour_corner_mask3.png and /dev/null differ
diff --git a/_images/contour_demo_00.png b/_images/contour_demo_00.png
deleted file mode 100644
index b2fe02f6530..00000000000
Binary files a/_images/contour_demo_00.png and /dev/null differ
diff --git a/_images/contour_demo_001.png b/_images/contour_demo_001.png
deleted file mode 100644
index b2fe02f6530..00000000000
Binary files a/_images/contour_demo_001.png and /dev/null differ
diff --git a/_images/contour_demo_002.png b/_images/contour_demo_002.png
deleted file mode 100644
index b2fe02f6530..00000000000
Binary files a/_images/contour_demo_002.png and /dev/null differ
diff --git a/_images/contour_demo_01.png b/_images/contour_demo_01.png
deleted file mode 100644
index 515048e6798..00000000000
Binary files a/_images/contour_demo_01.png and /dev/null differ
diff --git a/_images/contour_demo_011.png b/_images/contour_demo_011.png
deleted file mode 100644
index 515048e6798..00000000000
Binary files a/_images/contour_demo_011.png and /dev/null differ
diff --git a/_images/contour_demo_012.png b/_images/contour_demo_012.png
deleted file mode 100644
index 515048e6798..00000000000
Binary files a/_images/contour_demo_012.png and /dev/null differ
diff --git a/_images/contour_demo_02.png b/_images/contour_demo_02.png
deleted file mode 100644
index c8927e86083..00000000000
Binary files a/_images/contour_demo_02.png and /dev/null differ
diff --git a/_images/contour_demo_021.png b/_images/contour_demo_021.png
deleted file mode 100644
index c8927e86083..00000000000
Binary files a/_images/contour_demo_021.png and /dev/null differ
diff --git a/_images/contour_demo_022.png b/_images/contour_demo_022.png
deleted file mode 100644
index c8927e86083..00000000000
Binary files a/_images/contour_demo_022.png and /dev/null differ
diff --git a/_images/contour_demo_03.png b/_images/contour_demo_03.png
deleted file mode 100644
index d2baf253b55..00000000000
Binary files a/_images/contour_demo_03.png and /dev/null differ
diff --git a/_images/contour_demo_031.png b/_images/contour_demo_031.png
deleted file mode 100644
index d2baf253b55..00000000000
Binary files a/_images/contour_demo_031.png and /dev/null differ
diff --git a/_images/contour_demo_032.png b/_images/contour_demo_032.png
deleted file mode 100644
index d2baf253b55..00000000000
Binary files a/_images/contour_demo_032.png and /dev/null differ
diff --git a/_images/contour_demo_04.png b/_images/contour_demo_04.png
deleted file mode 100644
index 3081c247b18..00000000000
Binary files a/_images/contour_demo_04.png and /dev/null differ
diff --git a/_images/contour_demo_041.png b/_images/contour_demo_041.png
deleted file mode 100644
index 3081c247b18..00000000000
Binary files a/_images/contour_demo_041.png and /dev/null differ
diff --git a/_images/contour_demo_042.png b/_images/contour_demo_042.png
deleted file mode 100644
index 3081c247b18..00000000000
Binary files a/_images/contour_demo_042.png and /dev/null differ
diff --git a/_images/contour_demo_05.png b/_images/contour_demo_05.png
deleted file mode 100644
index 34714321b81..00000000000
Binary files a/_images/contour_demo_05.png and /dev/null differ
diff --git a/_images/contour_demo_051.png b/_images/contour_demo_051.png
deleted file mode 100644
index 34714321b81..00000000000
Binary files a/_images/contour_demo_051.png and /dev/null differ
diff --git a/_images/contour_demo_052.png b/_images/contour_demo_052.png
deleted file mode 100644
index 34714321b81..00000000000
Binary files a/_images/contour_demo_052.png and /dev/null differ
diff --git a/_images/contour_image.png b/_images/contour_image.png
deleted file mode 100644
index 82d34d1298e..00000000000
Binary files a/_images/contour_image.png and /dev/null differ
diff --git a/_images/contour_label_demo_00.png b/_images/contour_label_demo_00.png
deleted file mode 100644
index 537605f1780..00000000000
Binary files a/_images/contour_label_demo_00.png and /dev/null differ
diff --git a/_images/contour_label_demo_01.png b/_images/contour_label_demo_01.png
deleted file mode 100644
index e7f124ef520..00000000000
Binary files a/_images/contour_label_demo_01.png and /dev/null differ
diff --git a/_images/contour_label_demo_02.png b/_images/contour_label_demo_02.png
deleted file mode 100644
index 9fdadd6988a..00000000000
Binary files a/_images/contour_label_demo_02.png and /dev/null differ
diff --git a/_images/contour_manual_00.png b/_images/contour_manual_00.png
deleted file mode 100644
index d30b3ad34d9..00000000000
Binary files a/_images/contour_manual_00.png and /dev/null differ
diff --git a/_images/contour_manual_01.png b/_images/contour_manual_01.png
deleted file mode 100644
index 79bcf384302..00000000000
Binary files a/_images/contour_manual_01.png and /dev/null differ
diff --git a/_images/contourf3d_demo.png b/_images/contourf3d_demo.png
deleted file mode 100644
index dd91b3c374f..00000000000
Binary files a/_images/contourf3d_demo.png and /dev/null differ
diff --git a/_images/contourf3d_demo1.png b/_images/contourf3d_demo1.png
deleted file mode 100644
index dd91b3c374f..00000000000
Binary files a/_images/contourf3d_demo1.png and /dev/null differ
diff --git a/_images/contourf3d_demo2.png b/_images/contourf3d_demo2.png
deleted file mode 100644
index b3f353d3d71..00000000000
Binary files a/_images/contourf3d_demo2.png and /dev/null differ
diff --git a/_images/contourf3d_demo21.png b/_images/contourf3d_demo21.png
deleted file mode 100644
index b3f353d3d71..00000000000
Binary files a/_images/contourf3d_demo21.png and /dev/null differ
diff --git a/_images/contourf3d_demo22.png b/_images/contourf3d_demo22.png
deleted file mode 100644
index b3f353d3d71..00000000000
Binary files a/_images/contourf3d_demo22.png and /dev/null differ
diff --git a/_images/contourf3d_demo23.png b/_images/contourf3d_demo23.png
deleted file mode 100644
index b3f353d3d71..00000000000
Binary files a/_images/contourf3d_demo23.png and /dev/null differ
diff --git a/_images/contourf_demo_00.png b/_images/contourf_demo_00.png
deleted file mode 100644
index 56078bc8bf2..00000000000
Binary files a/_images/contourf_demo_00.png and /dev/null differ
diff --git a/_images/contourf_demo_001.png b/_images/contourf_demo_001.png
deleted file mode 100644
index 56078bc8bf2..00000000000
Binary files a/_images/contourf_demo_001.png and /dev/null differ
diff --git a/_images/contourf_demo_002.png b/_images/contourf_demo_002.png
deleted file mode 100644
index 56078bc8bf2..00000000000
Binary files a/_images/contourf_demo_002.png and /dev/null differ
diff --git a/_images/contourf_demo_01.png b/_images/contourf_demo_01.png
deleted file mode 100644
index f2c0d6b21e8..00000000000
Binary files a/_images/contourf_demo_01.png and /dev/null differ
diff --git a/_images/contourf_demo_011.png b/_images/contourf_demo_011.png
deleted file mode 100644
index f2c0d6b21e8..00000000000
Binary files a/_images/contourf_demo_011.png and /dev/null differ
diff --git a/_images/contourf_demo_012.png b/_images/contourf_demo_012.png
deleted file mode 100644
index f2c0d6b21e8..00000000000
Binary files a/_images/contourf_demo_012.png and /dev/null differ
diff --git a/_images/contourf_demo_02.png b/_images/contourf_demo_02.png
deleted file mode 100644
index b4d9cdb3ff9..00000000000
Binary files a/_images/contourf_demo_02.png and /dev/null differ
diff --git a/_images/contourf_demo_021.png b/_images/contourf_demo_021.png
deleted file mode 100644
index b4d9cdb3ff9..00000000000
Binary files a/_images/contourf_demo_021.png and /dev/null differ
diff --git a/_images/contourf_demo_022.png b/_images/contourf_demo_022.png
deleted file mode 100644
index b4d9cdb3ff9..00000000000
Binary files a/_images/contourf_demo_022.png and /dev/null differ
diff --git a/_images/contourf_hatching_00.png b/_images/contourf_hatching_00.png
deleted file mode 100644
index 180eb4b99f0..00000000000
Binary files a/_images/contourf_hatching_00.png and /dev/null differ
diff --git a/_images/contourf_hatching_001.png b/_images/contourf_hatching_001.png
deleted file mode 100644
index 180eb4b99f0..00000000000
Binary files a/_images/contourf_hatching_001.png and /dev/null differ
diff --git a/_images/contourf_hatching_01.png b/_images/contourf_hatching_01.png
deleted file mode 100644
index 51e327c62b7..00000000000
Binary files a/_images/contourf_hatching_01.png and /dev/null differ
diff --git a/_images/contourf_hatching_011.png b/_images/contourf_hatching_011.png
deleted file mode 100644
index 51e327c62b7..00000000000
Binary files a/_images/contourf_hatching_011.png and /dev/null differ
diff --git a/_images/contourf_log.png b/_images/contourf_log.png
deleted file mode 100644
index c7476b2ce09..00000000000
Binary files a/_images/contourf_log.png and /dev/null differ
diff --git a/_images/coords_demo.png b/_images/coords_demo.png
deleted file mode 100644
index d482dfca8c1..00000000000
Binary files a/_images/coords_demo.png and /dev/null differ
diff --git a/_images/coords_report.png b/_images/coords_report.png
deleted file mode 100644
index f2cf305fa8f..00000000000
Binary files a/_images/coords_report.png and /dev/null differ
diff --git a/_images/csd_demo.png b/_images/csd_demo.png
deleted file mode 100644
index fbe7b6d0222..00000000000
Binary files a/_images/csd_demo.png and /dev/null differ
diff --git a/_images/csd_demo1.png b/_images/csd_demo1.png
deleted file mode 100644
index fbe7b6d0222..00000000000
Binary files a/_images/csd_demo1.png and /dev/null differ
diff --git a/_images/csd_demo2.png b/_images/csd_demo2.png
deleted file mode 100644
index fbe7b6d0222..00000000000
Binary files a/_images/csd_demo2.png and /dev/null differ
diff --git a/_images/cursor.png b/_images/cursor.png
deleted file mode 100644
index 353287d9e2f..00000000000
Binary files a/_images/cursor.png and /dev/null differ
diff --git a/_images/custom_boxstyle01.png b/_images/custom_boxstyle01.png
deleted file mode 100644
index 188e75769c0..00000000000
Binary files a/_images/custom_boxstyle01.png and /dev/null differ
diff --git a/_images/custom_boxstyle02.png b/_images/custom_boxstyle02.png
deleted file mode 100644
index 0eea83560fb..00000000000
Binary files a/_images/custom_boxstyle02.png and /dev/null differ
diff --git a/_images/custom_cmap_00.png b/_images/custom_cmap_00.png
deleted file mode 100644
index e36cfc822fe..00000000000
Binary files a/_images/custom_cmap_00.png and /dev/null differ
diff --git a/_images/custom_cmap_01.png b/_images/custom_cmap_01.png
deleted file mode 100644
index 1d5565d067b..00000000000
Binary files a/_images/custom_cmap_01.png and /dev/null differ
diff --git a/_images/custom_figure_class.png b/_images/custom_figure_class.png
deleted file mode 100644
index 5efa114b0fe..00000000000
Binary files a/_images/custom_figure_class.png and /dev/null differ
diff --git a/_images/custom_projection_example.png b/_images/custom_projection_example.png
deleted file mode 100644
index a93a30c79aa..00000000000
Binary files a/_images/custom_projection_example.png and /dev/null differ
diff --git a/_images/custom_scale_example.png b/_images/custom_scale_example.png
deleted file mode 100644
index 89db5193221..00000000000
Binary files a/_images/custom_scale_example.png and /dev/null differ
diff --git a/_images/custom_shaded_3d_surface.png b/_images/custom_shaded_3d_surface.png
deleted file mode 100644
index 093546b02f5..00000000000
Binary files a/_images/custom_shaded_3d_surface.png and /dev/null differ
diff --git a/_images/custom_ticker1.png b/_images/custom_ticker1.png
deleted file mode 100644
index 409b024d089..00000000000
Binary files a/_images/custom_ticker1.png and /dev/null differ
diff --git a/_images/customize_rc.png b/_images/customize_rc.png
deleted file mode 100644
index 354f1415c50..00000000000
Binary files a/_images/customize_rc.png and /dev/null differ
diff --git a/_images/customized_violin_demo.png b/_images/customized_violin_demo.png
deleted file mode 100644
index a6f3c35ff6f..00000000000
Binary files a/_images/customized_violin_demo.png and /dev/null differ
diff --git a/_images/dashpointlabel.png b/_images/dashpointlabel.png
deleted file mode 100644
index affdaea397d..00000000000
Binary files a/_images/dashpointlabel.png and /dev/null differ
diff --git a/_images/date_demo.png b/_images/date_demo.png
deleted file mode 100644
index 15f3889c9aa..00000000000
Binary files a/_images/date_demo.png and /dev/null differ
diff --git a/_images/date_demo1.png b/_images/date_demo1.png
deleted file mode 100644
index 15f3889c9aa..00000000000
Binary files a/_images/date_demo1.png and /dev/null differ
diff --git a/_images/date_demo_convert.png b/_images/date_demo_convert.png
deleted file mode 100644
index 57ed92c412e..00000000000
Binary files a/_images/date_demo_convert.png and /dev/null differ
diff --git a/_images/date_demo_rrule.png b/_images/date_demo_rrule.png
deleted file mode 100644
index b2a949f3b56..00000000000
Binary files a/_images/date_demo_rrule.png and /dev/null differ
diff --git a/_images/date_index_formatter.png b/_images/date_index_formatter.png
deleted file mode 100644
index 604ecebbdee..00000000000
Binary files a/_images/date_index_formatter.png and /dev/null differ
diff --git a/_images/date_index_formatter1.png b/_images/date_index_formatter1.png
deleted file mode 100644
index 8b7e2239212..00000000000
Binary files a/_images/date_index_formatter1.png and /dev/null differ
diff --git a/_images/demo_affine_image.png b/_images/demo_affine_image.png
deleted file mode 100644
index d24b5a9b534..00000000000
Binary files a/_images/demo_affine_image.png and /dev/null differ
diff --git a/_images/demo_agg_filter.png b/_images/demo_agg_filter.png
deleted file mode 100644
index 04540dc331d..00000000000
Binary files a/_images/demo_agg_filter.png and /dev/null differ
diff --git a/_images/demo_annotation_box.png b/_images/demo_annotation_box.png
deleted file mode 100644
index f19040591fb..00000000000
Binary files a/_images/demo_annotation_box.png and /dev/null differ
diff --git a/_images/demo_axes_divider_01_00.png b/_images/demo_axes_divider_01_00.png
deleted file mode 100644
index 37c318bf00d..00000000000
Binary files a/_images/demo_axes_divider_01_00.png and /dev/null differ
diff --git a/_images/demo_axes_grid2.png b/_images/demo_axes_grid2.png
deleted file mode 100644
index 88cd5d225a5..00000000000
Binary files a/_images/demo_axes_grid2.png and /dev/null differ
diff --git a/_images/demo_axes_grid21.png b/_images/demo_axes_grid21.png
deleted file mode 100644
index 88cd5d225a5..00000000000
Binary files a/_images/demo_axes_grid21.png and /dev/null differ
diff --git a/_images/demo_axes_grid3.png b/_images/demo_axes_grid3.png
deleted file mode 100644
index 9399197bd42..00000000000
Binary files a/_images/demo_axes_grid3.png and /dev/null differ
diff --git a/_images/demo_axes_grid4.png b/_images/demo_axes_grid4.png
deleted file mode 100644
index 9af9fdfe638..00000000000
Binary files a/_images/demo_axes_grid4.png and /dev/null differ
diff --git a/_images/demo_axes_hbox_divider.png b/_images/demo_axes_hbox_divider.png
deleted file mode 100644
index 51108534a27..00000000000
Binary files a/_images/demo_axes_hbox_divider.png and /dev/null differ
diff --git a/_images/demo_axes_rgb_00.png b/_images/demo_axes_rgb_00.png
deleted file mode 100644
index 83008a136ce..00000000000
Binary files a/_images/demo_axes_rgb_00.png and /dev/null differ
diff --git a/_images/demo_axes_rgb_01.png b/_images/demo_axes_rgb_01.png
deleted file mode 100644
index 07cf4642e94..00000000000
Binary files a/_images/demo_axes_rgb_01.png and /dev/null differ
diff --git a/_images/demo_axis_direction.png b/_images/demo_axis_direction.png
deleted file mode 100644
index d0e96ce8347..00000000000
Binary files a/_images/demo_axis_direction.png and /dev/null differ
diff --git a/_images/demo_axisline_style.png b/_images/demo_axisline_style.png
deleted file mode 100644
index d704ca5b182..00000000000
Binary files a/_images/demo_axisline_style.png and /dev/null differ
diff --git a/_images/demo_bboximage.png b/_images/demo_bboximage.png
deleted file mode 100644
index decb9f1e0b4..00000000000
Binary files a/_images/demo_bboximage.png and /dev/null differ
diff --git a/_images/demo_colorbar_with_inset_locator.png b/_images/demo_colorbar_with_inset_locator.png
deleted file mode 100644
index e8540767524..00000000000
Binary files a/_images/demo_colorbar_with_inset_locator.png and /dev/null differ
diff --git a/_images/demo_curvelinear_grid.png b/_images/demo_curvelinear_grid.png
deleted file mode 100644
index 16bafea95e7..00000000000
Binary files a/_images/demo_curvelinear_grid.png and /dev/null differ
diff --git a/_images/demo_curvelinear_grid1.png b/_images/demo_curvelinear_grid1.png
deleted file mode 100644
index 16bafea95e7..00000000000
Binary files a/_images/demo_curvelinear_grid1.png and /dev/null differ
diff --git a/_images/demo_curvelinear_grid2.png b/_images/demo_curvelinear_grid2.png
deleted file mode 100644
index 0a9af0d4943..00000000000
Binary files a/_images/demo_curvelinear_grid2.png and /dev/null differ
diff --git a/_images/demo_edge_colorbar.png b/_images/demo_edge_colorbar.png
deleted file mode 100644
index 547a3e8db7b..00000000000
Binary files a/_images/demo_edge_colorbar.png and /dev/null differ
diff --git a/_images/demo_floating_axes.png b/_images/demo_floating_axes.png
deleted file mode 100644
index 548f34fedbb..00000000000
Binary files a/_images/demo_floating_axes.png and /dev/null differ
diff --git a/_images/demo_floating_axes1.png b/_images/demo_floating_axes1.png
deleted file mode 100644
index d60a886d4e4..00000000000
Binary files a/_images/demo_floating_axes1.png and /dev/null differ
diff --git a/_images/demo_floating_axis.png b/_images/demo_floating_axis.png
deleted file mode 100644
index a7e2088c5c9..00000000000
Binary files a/_images/demo_floating_axis.png and /dev/null differ
diff --git a/_images/demo_floating_axis1.png b/_images/demo_floating_axis1.png
deleted file mode 100644
index a7e2088c5c9..00000000000
Binary files a/_images/demo_floating_axis1.png and /dev/null differ
diff --git a/_images/demo_gridspec01.png b/_images/demo_gridspec01.png
deleted file mode 100644
index ba5bba258f6..00000000000
Binary files a/_images/demo_gridspec01.png and /dev/null differ
diff --git a/_images/demo_gridspec011.png b/_images/demo_gridspec011.png
deleted file mode 100644
index ba5bba258f6..00000000000
Binary files a/_images/demo_gridspec011.png and /dev/null differ
diff --git a/_images/demo_gridspec02.png b/_images/demo_gridspec02.png
deleted file mode 100644
index a1a27f8c83c..00000000000
Binary files a/_images/demo_gridspec02.png and /dev/null differ
diff --git a/_images/demo_gridspec03.png b/_images/demo_gridspec03.png
deleted file mode 100644
index 3165b66afd1..00000000000
Binary files a/_images/demo_gridspec03.png and /dev/null differ
diff --git a/_images/demo_gridspec04.png b/_images/demo_gridspec04.png
deleted file mode 100644
index ddd12ef69a5..00000000000
Binary files a/_images/demo_gridspec04.png and /dev/null differ
diff --git a/_images/demo_gridspec05.png b/_images/demo_gridspec05.png
deleted file mode 100644
index 23278afb579..00000000000
Binary files a/_images/demo_gridspec05.png and /dev/null differ
diff --git a/_images/demo_gridspec06.png b/_images/demo_gridspec06.png
deleted file mode 100644
index 06cceb9d192..00000000000
Binary files a/_images/demo_gridspec06.png and /dev/null differ
diff --git a/_images/demo_imagegrid_aspect.png b/_images/demo_imagegrid_aspect.png
deleted file mode 100644
index 4e23c61032b..00000000000
Binary files a/_images/demo_imagegrid_aspect.png and /dev/null differ
diff --git a/_images/demo_parasite_axes2.png b/_images/demo_parasite_axes2.png
deleted file mode 100644
index bac1bdf5e67..00000000000
Binary files a/_images/demo_parasite_axes2.png and /dev/null differ
diff --git a/_images/demo_parasite_axes21.png b/_images/demo_parasite_axes21.png
deleted file mode 100644
index bac1bdf5e67..00000000000
Binary files a/_images/demo_parasite_axes21.png and /dev/null differ
diff --git a/_images/demo_ribbon_box.png b/_images/demo_ribbon_box.png
deleted file mode 100644
index 676551e6b31..00000000000
Binary files a/_images/demo_ribbon_box.png and /dev/null differ
diff --git a/_images/demo_text_path.png b/_images/demo_text_path.png
deleted file mode 100644
index 9b5140d0c60..00000000000
Binary files a/_images/demo_text_path.png and /dev/null differ
diff --git a/_images/demo_text_rotation_mode.png b/_images/demo_text_rotation_mode.png
deleted file mode 100644
index 8215b09fd4c..00000000000
Binary files a/_images/demo_text_rotation_mode.png and /dev/null differ
diff --git a/_images/demo_ticklabel_alignment.png b/_images/demo_ticklabel_alignment.png
deleted file mode 100644
index 42cee2ee1b6..00000000000
Binary files a/_images/demo_ticklabel_alignment.png and /dev/null differ
diff --git a/_images/demo_tight_layout_00_00.png b/_images/demo_tight_layout_00_00.png
deleted file mode 100644
index 7fa0ec15d22..00000000000
Binary files a/_images/demo_tight_layout_00_00.png and /dev/null differ
diff --git a/_images/demo_tight_layout_00_01.png b/_images/demo_tight_layout_00_01.png
deleted file mode 100644
index ea8fcfa48c7..00000000000
Binary files a/_images/demo_tight_layout_00_01.png and /dev/null differ
diff --git a/_images/demo_tight_layout_00_02.png b/_images/demo_tight_layout_00_02.png
deleted file mode 100644
index 505daac1747..00000000000
Binary files a/_images/demo_tight_layout_00_02.png and /dev/null differ
diff --git a/_images/demo_tight_layout_00_03.png b/_images/demo_tight_layout_00_03.png
deleted file mode 100644
index 3f6225bce95..00000000000
Binary files a/_images/demo_tight_layout_00_03.png and /dev/null differ
diff --git a/_images/demo_tight_layout_00_04.png b/_images/demo_tight_layout_00_04.png
deleted file mode 100644
index fc611f71731..00000000000
Binary files a/_images/demo_tight_layout_00_04.png and /dev/null differ
diff --git a/_images/demo_tight_layout_00_05.png b/_images/demo_tight_layout_00_05.png
deleted file mode 100644
index 1a1655589b1..00000000000
Binary files a/_images/demo_tight_layout_00_05.png and /dev/null differ
diff --git a/_images/demo_tight_layout_00_06.png b/_images/demo_tight_layout_00_06.png
deleted file mode 100644
index 3522593b50a..00000000000
Binary files a/_images/demo_tight_layout_00_06.png and /dev/null differ
diff --git a/_images/demo_tight_layout_01_00.png b/_images/demo_tight_layout_01_00.png
deleted file mode 100644
index f77ef21c7ef..00000000000
Binary files a/_images/demo_tight_layout_01_00.png and /dev/null differ
diff --git a/_images/dollar_ticks.png b/_images/dollar_ticks.png
deleted file mode 100644
index 6bae9fea040..00000000000
Binary files a/_images/dollar_ticks.png and /dev/null differ
diff --git a/_images/dolphin.png b/_images/dolphin.png
deleted file mode 100644
index 5d466841232..00000000000
Binary files a/_images/dolphin.png and /dev/null differ
diff --git a/_images/donut_demo.png b/_images/donut_demo.png
deleted file mode 100644
index 6cd3686ee64..00000000000
Binary files a/_images/donut_demo.png and /dev/null differ
diff --git a/_images/ellipse_collection.png b/_images/ellipse_collection.png
deleted file mode 100644
index 1e19085b83a..00000000000
Binary files a/_images/ellipse_collection.png and /dev/null differ
diff --git a/_images/ellipse_demo.png b/_images/ellipse_demo.png
deleted file mode 100644
index 5a76a86c26c..00000000000
Binary files a/_images/ellipse_demo.png and /dev/null differ
diff --git a/_images/ellipse_demo1.png b/_images/ellipse_demo1.png
deleted file mode 100644
index 5a76a86c26c..00000000000
Binary files a/_images/ellipse_demo1.png and /dev/null differ
diff --git a/_images/ellipse_rotated.png b/_images/ellipse_rotated.png
deleted file mode 100644
index c849fc88b45..00000000000
Binary files a/_images/ellipse_rotated.png and /dev/null differ
diff --git a/_images/ellipse_with_units_00.png b/_images/ellipse_with_units_00.png
deleted file mode 100644
index 07ba2fd65d9..00000000000
Binary files a/_images/ellipse_with_units_00.png and /dev/null differ
diff --git a/_images/ellipse_with_units_01.png b/_images/ellipse_with_units_01.png
deleted file mode 100644
index 05d3b514270..00000000000
Binary files a/_images/ellipse_with_units_01.png and /dev/null differ
diff --git a/_images/engineering_formatter.png b/_images/engineering_formatter.png
deleted file mode 100644
index 3e38f6e6801..00000000000
Binary files a/_images/engineering_formatter.png and /dev/null differ
diff --git a/_images/equal_aspect_ratio.png b/_images/equal_aspect_ratio.png
deleted file mode 100644
index 8c63140264f..00000000000
Binary files a/_images/equal_aspect_ratio.png and /dev/null differ
diff --git a/_images/errorbar_demo.png b/_images/errorbar_demo.png
deleted file mode 100644
index 7522f385cde..00000000000
Binary files a/_images/errorbar_demo.png and /dev/null differ
diff --git a/_images/errorbar_demo1.png b/_images/errorbar_demo1.png
deleted file mode 100644
index 7522f385cde..00000000000
Binary files a/_images/errorbar_demo1.png and /dev/null differ
diff --git a/_images/errorbar_demo2.png b/_images/errorbar_demo2.png
deleted file mode 100644
index 7522f385cde..00000000000
Binary files a/_images/errorbar_demo2.png and /dev/null differ
diff --git a/_images/errorbar_demo_features.png b/_images/errorbar_demo_features.png
deleted file mode 100644
index 743840b6ac2..00000000000
Binary files a/_images/errorbar_demo_features.png and /dev/null differ
diff --git a/_images/errorbar_limits.png b/_images/errorbar_limits.png
deleted file mode 100644
index 523d9e374a0..00000000000
Binary files a/_images/errorbar_limits.png and /dev/null differ
diff --git a/_images/errorbar_limits_00.png b/_images/errorbar_limits_00.png
deleted file mode 100644
index 64c85a19918..00000000000
Binary files a/_images/errorbar_limits_00.png and /dev/null differ
diff --git a/_images/errorbar_limits_01.png b/_images/errorbar_limits_01.png
deleted file mode 100644
index 032c81bd291..00000000000
Binary files a/_images/errorbar_limits_01.png and /dev/null differ
diff --git a/_images/errorbar_subsample.png b/_images/errorbar_subsample.png
deleted file mode 100644
index affdd35bb77..00000000000
Binary files a/_images/errorbar_subsample.png and /dev/null differ
diff --git a/_images/errorbars_and_boxes.png b/_images/errorbars_and_boxes.png
deleted file mode 100644
index 90ab98f842b..00000000000
Binary files a/_images/errorbars_and_boxes.png and /dev/null differ
diff --git a/_images/evans_test.png b/_images/evans_test.png
deleted file mode 100644
index 947f7a6914d..00000000000
Binary files a/_images/evans_test.png and /dev/null differ
diff --git a/_images/eventcollection_demo1.png b/_images/eventcollection_demo1.png
deleted file mode 100644
index 378c2c5d60d..00000000000
Binary files a/_images/eventcollection_demo1.png and /dev/null differ
diff --git a/_images/eventplot_demo1.png b/_images/eventplot_demo1.png
deleted file mode 100644
index dd89f0e7aef..00000000000
Binary files a/_images/eventplot_demo1.png and /dev/null differ
diff --git a/_images/eventplot_demo2.png b/_images/eventplot_demo2.png
deleted file mode 100644
index dd89f0e7aef..00000000000
Binary files a/_images/eventplot_demo2.png and /dev/null differ
diff --git a/_images/eventplot_demo3.png b/_images/eventplot_demo3.png
deleted file mode 100644
index dd89f0e7aef..00000000000
Binary files a/_images/eventplot_demo3.png and /dev/null differ
diff --git a/_images/fahrenheit_celsius_scales.png b/_images/fahrenheit_celsius_scales.png
deleted file mode 100644
index d2fc1885a81..00000000000
Binary files a/_images/fahrenheit_celsius_scales.png and /dev/null differ
diff --git a/_images/fancyarrow_demo.png b/_images/fancyarrow_demo.png
deleted file mode 100644
index ff2a6c86837..00000000000
Binary files a/_images/fancyarrow_demo.png and /dev/null differ
diff --git a/_images/fancyarrow_demo1.png b/_images/fancyarrow_demo1.png
deleted file mode 100644
index ff2a6c86837..00000000000
Binary files a/_images/fancyarrow_demo1.png and /dev/null differ
diff --git a/_images/fancyarrow_demo2.png b/_images/fancyarrow_demo2.png
deleted file mode 100644
index ff2a6c86837..00000000000
Binary files a/_images/fancyarrow_demo2.png and /dev/null differ
diff --git a/_images/fancybox_demo2.png b/_images/fancybox_demo2.png
deleted file mode 100644
index acdf541378b..00000000000
Binary files a/_images/fancybox_demo2.png and /dev/null differ
diff --git a/_images/fancybox_demo21.png b/_images/fancybox_demo21.png
deleted file mode 100644
index acdf541378b..00000000000
Binary files a/_images/fancybox_demo21.png and /dev/null differ
diff --git a/_images/fancybox_demo22.png b/_images/fancybox_demo22.png
deleted file mode 100644
index acdf541378b..00000000000
Binary files a/_images/fancybox_demo22.png and /dev/null differ
diff --git a/_images/fancybox_demo_01_00.png b/_images/fancybox_demo_01_00.png
deleted file mode 100644
index be3619e6f68..00000000000
Binary files a/_images/fancybox_demo_01_00.png and /dev/null differ
diff --git a/_images/fancytextbox_demo.png b/_images/fancytextbox_demo.png
deleted file mode 100644
index 50f307dc89f..00000000000
Binary files a/_images/fancytextbox_demo.png and /dev/null differ
diff --git a/_images/fig_axes_customize_simple.png b/_images/fig_axes_customize_simple.png
deleted file mode 100644
index ca54b608f6f..00000000000
Binary files a/_images/fig_axes_customize_simple.png and /dev/null differ
diff --git a/_images/fig_axes_labels_simple.png b/_images/fig_axes_labels_simple.png
deleted file mode 100644
index cb5356f0760..00000000000
Binary files a/_images/fig_axes_labels_simple.png and /dev/null differ
diff --git a/_images/fig_x.png b/_images/fig_x.png
deleted file mode 100644
index 0f587d4d0b4..00000000000
Binary files a/_images/fig_x.png and /dev/null differ
diff --git a/_images/figimage_demo.png b/_images/figimage_demo.png
deleted file mode 100644
index 806dadd8225..00000000000
Binary files a/_images/figimage_demo.png and /dev/null differ
diff --git a/_images/figimage_demo1.png b/_images/figimage_demo1.png
deleted file mode 100644
index 806dadd8225..00000000000
Binary files a/_images/figimage_demo1.png and /dev/null differ
diff --git a/_images/figlegend_demo.png b/_images/figlegend_demo.png
deleted file mode 100644
index ca9ebf8584b..00000000000
Binary files a/_images/figlegend_demo.png and /dev/null differ
diff --git a/_images/figlegend_demo1.png b/_images/figlegend_demo1.png
deleted file mode 100644
index ca9ebf8584b..00000000000
Binary files a/_images/figlegend_demo1.png and /dev/null differ
diff --git a/_images/figure_title.png b/_images/figure_title.png
deleted file mode 100644
index 1c22ff36749..00000000000
Binary files a/_images/figure_title.png and /dev/null differ
diff --git a/_images/fill_between_demo_00.png b/_images/fill_between_demo_00.png
deleted file mode 100644
index 4033b51f171..00000000000
Binary files a/_images/fill_between_demo_00.png and /dev/null differ
diff --git a/_images/fill_between_demo_001.png b/_images/fill_between_demo_001.png
deleted file mode 100644
index 4033b51f171..00000000000
Binary files a/_images/fill_between_demo_001.png and /dev/null differ
diff --git a/_images/fill_between_demo_002.png b/_images/fill_between_demo_002.png
deleted file mode 100644
index 4033b51f171..00000000000
Binary files a/_images/fill_between_demo_002.png and /dev/null differ
diff --git a/_images/fill_between_demo_01.png b/_images/fill_between_demo_01.png
deleted file mode 100644
index 2878b65f9c1..00000000000
Binary files a/_images/fill_between_demo_01.png and /dev/null differ
diff --git a/_images/fill_between_demo_011.png b/_images/fill_between_demo_011.png
deleted file mode 100644
index 2878b65f9c1..00000000000
Binary files a/_images/fill_between_demo_011.png and /dev/null differ
diff --git a/_images/fill_between_demo_012.png b/_images/fill_between_demo_012.png
deleted file mode 100644
index 2878b65f9c1..00000000000
Binary files a/_images/fill_between_demo_012.png and /dev/null differ
diff --git a/_images/fill_between_demo_02.png b/_images/fill_between_demo_02.png
deleted file mode 100644
index 139ccabace0..00000000000
Binary files a/_images/fill_between_demo_02.png and /dev/null differ
diff --git a/_images/fill_between_demo_021.png b/_images/fill_between_demo_021.png
deleted file mode 100644
index 139ccabace0..00000000000
Binary files a/_images/fill_between_demo_021.png and /dev/null differ
diff --git a/_images/fill_between_demo_022.png b/_images/fill_between_demo_022.png
deleted file mode 100644
index 139ccabace0..00000000000
Binary files a/_images/fill_between_demo_022.png and /dev/null differ
diff --git a/_images/fill_betweenx_demo_00.png b/_images/fill_betweenx_demo_00.png
deleted file mode 100644
index 4e520c19614..00000000000
Binary files a/_images/fill_betweenx_demo_00.png and /dev/null differ
diff --git a/_images/fill_betweenx_demo_001.png b/_images/fill_betweenx_demo_001.png
deleted file mode 100644
index 4e520c19614..00000000000
Binary files a/_images/fill_betweenx_demo_001.png and /dev/null differ
diff --git a/_images/fill_betweenx_demo_002.png b/_images/fill_betweenx_demo_002.png
deleted file mode 100644
index 4e520c19614..00000000000
Binary files a/_images/fill_betweenx_demo_002.png and /dev/null differ
diff --git a/_images/fill_betweenx_demo_01.png b/_images/fill_betweenx_demo_01.png
deleted file mode 100644
index 44e3ac163f0..00000000000
Binary files a/_images/fill_betweenx_demo_01.png and /dev/null differ
diff --git a/_images/fill_betweenx_demo_011.png b/_images/fill_betweenx_demo_011.png
deleted file mode 100644
index 44e3ac163f0..00000000000
Binary files a/_images/fill_betweenx_demo_011.png and /dev/null differ
diff --git a/_images/fill_betweenx_demo_012.png b/_images/fill_betweenx_demo_012.png
deleted file mode 100644
index 44e3ac163f0..00000000000
Binary files a/_images/fill_betweenx_demo_012.png and /dev/null differ
diff --git a/_images/fill_demo.png b/_images/fill_demo.png
deleted file mode 100644
index b0a2e97f9c5..00000000000
Binary files a/_images/fill_demo.png and /dev/null differ
diff --git a/_images/fill_demo1.png b/_images/fill_demo1.png
deleted file mode 100644
index b0a2e97f9c5..00000000000
Binary files a/_images/fill_demo1.png and /dev/null differ
diff --git a/_images/fill_demo2.png b/_images/fill_demo2.png
deleted file mode 100644
index b0a2e97f9c5..00000000000
Binary files a/_images/fill_demo2.png and /dev/null differ
diff --git a/_images/fill_demo3.png b/_images/fill_demo3.png
deleted file mode 100644
index b0a2e97f9c5..00000000000
Binary files a/_images/fill_demo3.png and /dev/null differ
diff --git a/_images/fill_demo_features.png b/_images/fill_demo_features.png
deleted file mode 100644
index d0f444e5b3f..00000000000
Binary files a/_images/fill_demo_features.png and /dev/null differ
diff --git a/_images/fill_spiral.png b/_images/fill_spiral.png
deleted file mode 100644
index 1b6025297cb..00000000000
Binary files a/_images/fill_spiral.png and /dev/null differ
diff --git a/_images/filled_step_00.png b/_images/filled_step_00.png
deleted file mode 100644
index 1db676e2359..00000000000
Binary files a/_images/filled_step_00.png and /dev/null differ
diff --git a/_images/filled_step_001.png b/_images/filled_step_001.png
deleted file mode 100644
index 1db676e2359..00000000000
Binary files a/_images/filled_step_001.png and /dev/null differ
diff --git a/_images/filled_step_01.png b/_images/filled_step_01.png
deleted file mode 100644
index c63b05f9950..00000000000
Binary files a/_images/filled_step_01.png and /dev/null differ
diff --git a/_images/filled_step_011.png b/_images/filled_step_011.png
deleted file mode 100644
index c63b05f9950..00000000000
Binary files a/_images/filled_step_011.png and /dev/null differ
diff --git a/_images/findobj_demo.png b/_images/findobj_demo.png
deleted file mode 100644
index cf57e80e311..00000000000
Binary files a/_images/findobj_demo.png and /dev/null differ
diff --git a/_images/firefox.png b/_images/firefox.png
deleted file mode 100644
index f2da0ee390a..00000000000
Binary files a/_images/firefox.png and /dev/null differ
diff --git a/_images/fonts_demo.png b/_images/fonts_demo.png
deleted file mode 100644
index 9eadd3dd455..00000000000
Binary files a/_images/fonts_demo.png and /dev/null differ
diff --git a/_images/fonts_demo_kw.png b/_images/fonts_demo_kw.png
deleted file mode 100644
index 45129e1aad0..00000000000
Binary files a/_images/fonts_demo_kw.png and /dev/null differ
diff --git a/_images/ganged_plots.png b/_images/ganged_plots.png
deleted file mode 100644
index 1d62e6eca78..00000000000
Binary files a/_images/ganged_plots.png and /dev/null differ
diff --git a/_images/geo_demo_00.png b/_images/geo_demo_00.png
deleted file mode 100644
index 6eb2d293d4d..00000000000
Binary files a/_images/geo_demo_00.png and /dev/null differ
diff --git a/_images/geo_demo_01.png b/_images/geo_demo_01.png
deleted file mode 100644
index 71a5d626484..00000000000
Binary files a/_images/geo_demo_01.png and /dev/null differ
diff --git a/_images/geo_demo_02.png b/_images/geo_demo_02.png
deleted file mode 100644
index 1d0e6520769..00000000000
Binary files a/_images/geo_demo_02.png and /dev/null differ
diff --git a/_images/geo_demo_03.png b/_images/geo_demo_03.png
deleted file mode 100644
index 74e198df1c9..00000000000
Binary files a/_images/geo_demo_03.png and /dev/null differ
diff --git a/_images/gradient_bar.png b/_images/gradient_bar.png
deleted file mode 100644
index 5d3af52e53e..00000000000
Binary files a/_images/gradient_bar.png and /dev/null differ
diff --git a/_images/grayscale_01_00.png b/_images/grayscale_01_00.png
deleted file mode 100644
index adeac59cb06..00000000000
Binary files a/_images/grayscale_01_00.png and /dev/null differ
diff --git a/_images/grayscale_01_01.png b/_images/grayscale_01_01.png
deleted file mode 100644
index 737419a81c0..00000000000
Binary files a/_images/grayscale_01_01.png and /dev/null differ
diff --git a/_images/grayscale_01_02.png b/_images/grayscale_01_02.png
deleted file mode 100644
index 23cf5f8c50d..00000000000
Binary files a/_images/grayscale_01_02.png and /dev/null differ
diff --git a/_images/grayscale_01_03.png b/_images/grayscale_01_03.png
deleted file mode 100644
index 77114d74ec5..00000000000
Binary files a/_images/grayscale_01_03.png and /dev/null differ
diff --git a/_images/grayscale_01_04.png b/_images/grayscale_01_04.png
deleted file mode 100644
index b213dd305d6..00000000000
Binary files a/_images/grayscale_01_04.png and /dev/null differ
diff --git a/_images/grayscale_01_05.png b/_images/grayscale_01_05.png
deleted file mode 100644
index 25920dff603..00000000000
Binary files a/_images/grayscale_01_05.png and /dev/null differ
diff --git a/_images/griddata_demo.png b/_images/griddata_demo.png
deleted file mode 100644
index 3c9213addf3..00000000000
Binary files a/_images/griddata_demo.png and /dev/null differ
diff --git a/_images/hatch_demo.png b/_images/hatch_demo.png
deleted file mode 100644
index 7afcc6cf194..00000000000
Binary files a/_images/hatch_demo.png and /dev/null differ
diff --git a/_images/hexbin_demo.png b/_images/hexbin_demo.png
deleted file mode 100644
index 955a92826c7..00000000000
Binary files a/_images/hexbin_demo.png and /dev/null differ
diff --git a/_images/hexbin_demo1.png b/_images/hexbin_demo1.png
deleted file mode 100644
index 955a92826c7..00000000000
Binary files a/_images/hexbin_demo1.png and /dev/null differ
diff --git a/_images/hexbin_demo2.png b/_images/hexbin_demo2.png
deleted file mode 100644
index a7d6dd91c19..00000000000
Binary files a/_images/hexbin_demo2.png and /dev/null differ
diff --git a/_images/hexbin_demo3.png b/_images/hexbin_demo3.png
deleted file mode 100644
index 955a92826c7..00000000000
Binary files a/_images/hexbin_demo3.png and /dev/null differ
diff --git a/_images/hinton_demo.png b/_images/hinton_demo.png
deleted file mode 100644
index 658b0c83f10..00000000000
Binary files a/_images/hinton_demo.png and /dev/null differ
diff --git a/_images/hist2d_demo.png b/_images/hist2d_demo.png
deleted file mode 100644
index 16e9ee3aa7f..00000000000
Binary files a/_images/hist2d_demo.png and /dev/null differ
diff --git a/_images/hist2d_demo1.png b/_images/hist2d_demo1.png
deleted file mode 100644
index 16e9ee3aa7f..00000000000
Binary files a/_images/hist2d_demo1.png and /dev/null differ
diff --git a/_images/hist2d_demo2.png b/_images/hist2d_demo2.png
deleted file mode 100644
index 16e9ee3aa7f..00000000000
Binary files a/_images/hist2d_demo2.png and /dev/null differ
diff --git a/_images/hist2d_log_demo.png b/_images/hist2d_log_demo.png
deleted file mode 100644
index 952e3a54ff3..00000000000
Binary files a/_images/hist2d_log_demo.png and /dev/null differ
diff --git a/_images/hist3d_demo.png b/_images/hist3d_demo.png
deleted file mode 100644
index 0efad6eb2c5..00000000000
Binary files a/_images/hist3d_demo.png and /dev/null differ
diff --git a/_images/hist_colormapped.png b/_images/hist_colormapped.png
deleted file mode 100644
index 6913562d53a..00000000000
Binary files a/_images/hist_colormapped.png and /dev/null differ
diff --git a/_images/histogram_demo_cumulative.png b/_images/histogram_demo_cumulative.png
deleted file mode 100644
index ad97f03a896..00000000000
Binary files a/_images/histogram_demo_cumulative.png and /dev/null differ
diff --git a/_images/histogram_demo_features.png b/_images/histogram_demo_features.png
deleted file mode 100644
index 2994394d196..00000000000
Binary files a/_images/histogram_demo_features.png and /dev/null differ
diff --git a/_images/histogram_demo_features1.png b/_images/histogram_demo_features1.png
deleted file mode 100644
index 2994394d196..00000000000
Binary files a/_images/histogram_demo_features1.png and /dev/null differ
diff --git a/_images/histogram_demo_features2.png b/_images/histogram_demo_features2.png
deleted file mode 100644
index 2994394d196..00000000000
Binary files a/_images/histogram_demo_features2.png and /dev/null differ
diff --git a/_images/histogram_demo_features3.png b/_images/histogram_demo_features3.png
deleted file mode 100644
index 2994394d196..00000000000
Binary files a/_images/histogram_demo_features3.png and /dev/null differ
diff --git a/_images/histogram_demo_histtypes.png b/_images/histogram_demo_histtypes.png
deleted file mode 100644
index ebe03ff0d0f..00000000000
Binary files a/_images/histogram_demo_histtypes.png and /dev/null differ
diff --git a/_images/histogram_demo_multihist.png b/_images/histogram_demo_multihist.png
deleted file mode 100644
index 28bc7a49db3..00000000000
Binary files a/_images/histogram_demo_multihist.png and /dev/null differ
diff --git a/_images/histogram_path_demo.png b/_images/histogram_path_demo.png
deleted file mode 100644
index c4c90a59791..00000000000
Binary files a/_images/histogram_path_demo.png and /dev/null differ
diff --git a/_images/histogram_path_demo1.png b/_images/histogram_path_demo1.png
deleted file mode 100644
index c4c90a59791..00000000000
Binary files a/_images/histogram_path_demo1.png and /dev/null differ
diff --git a/_images/histogram_percent_demo.png b/_images/histogram_percent_demo.png
deleted file mode 100644
index 52924b35125..00000000000
Binary files a/_images/histogram_percent_demo.png and /dev/null differ
diff --git a/_images/image_clip_path.png b/_images/image_clip_path.png
deleted file mode 100644
index 5f1b586cd45..00000000000
Binary files a/_images/image_clip_path.png and /dev/null differ
diff --git a/_images/image_demo.png b/_images/image_demo.png
deleted file mode 100644
index d88bc4abedd..00000000000
Binary files a/_images/image_demo.png and /dev/null differ
diff --git a/_images/image_demo1.png b/_images/image_demo1.png
deleted file mode 100644
index d88bc4abedd..00000000000
Binary files a/_images/image_demo1.png and /dev/null differ
diff --git a/_images/image_demo2.png b/_images/image_demo2.png
deleted file mode 100644
index afcbf028387..00000000000
Binary files a/_images/image_demo2.png and /dev/null differ
diff --git a/_images/image_demo3.png b/_images/image_demo3.png
deleted file mode 100644
index 6453ed018b3..00000000000
Binary files a/_images/image_demo3.png and /dev/null differ
diff --git a/_images/image_demo4.png b/_images/image_demo4.png
deleted file mode 100644
index d88bc4abedd..00000000000
Binary files a/_images/image_demo4.png and /dev/null differ
diff --git a/_images/image_demo_clip_path.png b/_images/image_demo_clip_path.png
deleted file mode 100644
index b0f2311f0f5..00000000000
Binary files a/_images/image_demo_clip_path.png and /dev/null differ
diff --git a/_images/image_interp_00.png b/_images/image_interp_00.png
deleted file mode 100644
index d560d804c03..00000000000
Binary files a/_images/image_interp_00.png and /dev/null differ
diff --git a/_images/image_interp_01.png b/_images/image_interp_01.png
deleted file mode 100644
index 1059fd58e8c..00000000000
Binary files a/_images/image_interp_01.png and /dev/null differ
diff --git a/_images/image_interp_02.png b/_images/image_interp_02.png
deleted file mode 100644
index 4fe44c90465..00000000000
Binary files a/_images/image_interp_02.png and /dev/null differ
diff --git a/_images/image_masked.png b/_images/image_masked.png
deleted file mode 100644
index ae9c1439b05..00000000000
Binary files a/_images/image_masked.png and /dev/null differ
diff --git a/_images/image_nonuniform.png b/_images/image_nonuniform.png
deleted file mode 100644
index 1589066f0f9..00000000000
Binary files a/_images/image_nonuniform.png and /dev/null differ
diff --git a/_images/image_origin.png b/_images/image_origin.png
deleted file mode 100644
index bf71d39a6cc..00000000000
Binary files a/_images/image_origin.png and /dev/null differ
diff --git a/_images/image_slices_viewer.png b/_images/image_slices_viewer.png
deleted file mode 100644
index 029bea5bc7d..00000000000
Binary files a/_images/image_slices_viewer.png and /dev/null differ
diff --git a/_images/image_tutorial-1.png b/_images/image_tutorial-1.png
deleted file mode 100644
index 52fef3ef4fc..00000000000
Binary files a/_images/image_tutorial-1.png and /dev/null differ
diff --git a/_images/image_tutorial-10.png b/_images/image_tutorial-10.png
deleted file mode 100644
index 35e6c945ad8..00000000000
Binary files a/_images/image_tutorial-10.png and /dev/null differ
diff --git a/_images/image_tutorial-2.png b/_images/image_tutorial-2.png
deleted file mode 100644
index e181457def0..00000000000
Binary files a/_images/image_tutorial-2.png and /dev/null differ
diff --git a/_images/image_tutorial-3.png b/_images/image_tutorial-3.png
deleted file mode 100644
index cfb3ff0dc67..00000000000
Binary files a/_images/image_tutorial-3.png and /dev/null differ
diff --git a/_images/image_tutorial-4.png b/_images/image_tutorial-4.png
deleted file mode 100644
index 58122ae5a2f..00000000000
Binary files a/_images/image_tutorial-4.png and /dev/null differ
diff --git a/_images/image_tutorial-5.png b/_images/image_tutorial-5.png
deleted file mode 100644
index e14800bfdc3..00000000000
Binary files a/_images/image_tutorial-5.png and /dev/null differ
diff --git a/_images/image_tutorial-6.png b/_images/image_tutorial-6.png
deleted file mode 100644
index 7c51023d560..00000000000
Binary files a/_images/image_tutorial-6.png and /dev/null differ
diff --git a/_images/image_tutorial-7.png b/_images/image_tutorial-7.png
deleted file mode 100644
index cc43e02c4a2..00000000000
Binary files a/_images/image_tutorial-7.png and /dev/null differ
diff --git a/_images/image_tutorial-8.png b/_images/image_tutorial-8.png
deleted file mode 100644
index 032885ef501..00000000000
Binary files a/_images/image_tutorial-8.png and /dev/null differ
diff --git a/_images/image_tutorial-9.png b/_images/image_tutorial-9.png
deleted file mode 100644
index 032885ef501..00000000000
Binary files a/_images/image_tutorial-9.png and /dev/null differ
diff --git a/_images/image_zcoord.png b/_images/image_zcoord.png
deleted file mode 100644
index c1d4d1075c3..00000000000
Binary files a/_images/image_zcoord.png and /dev/null differ
diff --git a/_images/inheritance-3d3782cdd2b1de4db70e97701ced4ca1e7396315.png b/_images/inheritance-3d3782cdd2b1de4db70e97701ced4ca1e7396315.png
deleted file mode 100644
index ae2d67a368b..00000000000
Binary files a/_images/inheritance-3d3782cdd2b1de4db70e97701ced4ca1e7396315.png and /dev/null differ
diff --git a/_images/inheritance-3d3782cdd2b1de4db70e97701ced4ca1e7396315.png.map b/_images/inheritance-3d3782cdd2b1de4db70e97701ced4ca1e7396315.png.map
deleted file mode 100644
index c577d7ed7e8..00000000000
--- a/_images/inheritance-3d3782cdd2b1de4db70e97701ced4ca1e7396315.png.map
+++ /dev/null
@@ -1,13 +0,0 @@
-
diff --git a/_images/inheritance-bc3b85d7b4e6f17188dcb3276538ad7632f1bfb9.png b/_images/inheritance-bc3b85d7b4e6f17188dcb3276538ad7632f1bfb9.png
deleted file mode 100644
index 3e003bb8e89..00000000000
Binary files a/_images/inheritance-bc3b85d7b4e6f17188dcb3276538ad7632f1bfb9.png and /dev/null differ
diff --git a/_images/inheritance-bc3b85d7b4e6f17188dcb3276538ad7632f1bfb9.png.map b/_images/inheritance-bc3b85d7b4e6f17188dcb3276538ad7632f1bfb9.png.map
deleted file mode 100644
index 8fd1dc2d36b..00000000000
--- a/_images/inheritance-bc3b85d7b4e6f17188dcb3276538ad7632f1bfb9.png.map
+++ /dev/null
@@ -1,23 +0,0 @@
-
diff --git a/_images/inheritance-d00a2c53c24b19d03d6390c8f65b04968e230aa6.png b/_images/inheritance-d00a2c53c24b19d03d6390c8f65b04968e230aa6.png
deleted file mode 100644
index 290003f0f9d..00000000000
Binary files a/_images/inheritance-d00a2c53c24b19d03d6390c8f65b04968e230aa6.png and /dev/null differ
diff --git a/_images/inheritance-d00a2c53c24b19d03d6390c8f65b04968e230aa6.png.map b/_images/inheritance-d00a2c53c24b19d03d6390c8f65b04968e230aa6.png.map
deleted file mode 100644
index 134fdb88bcb..00000000000
--- a/_images/inheritance-d00a2c53c24b19d03d6390c8f65b04968e230aa6.png.map
+++ /dev/null
@@ -1,29 +0,0 @@
-
diff --git a/_images/inheritance-f965f673138e3d2c62a727b9afd9500b385009eb.png b/_images/inheritance-f965f673138e3d2c62a727b9afd9500b385009eb.png
deleted file mode 100644
index bd5b217ef19..00000000000
Binary files a/_images/inheritance-f965f673138e3d2c62a727b9afd9500b385009eb.png and /dev/null differ
diff --git a/_images/inheritance-f965f673138e3d2c62a727b9afd9500b385009eb.png.map b/_images/inheritance-f965f673138e3d2c62a727b9afd9500b385009eb.png.map
deleted file mode 100644
index c115fd608d0..00000000000
--- a/_images/inheritance-f965f673138e3d2c62a727b9afd9500b385009eb.png.map
+++ /dev/null
@@ -1,76 +0,0 @@
-
diff --git a/_images/inset_locator_demo.png b/_images/inset_locator_demo.png
deleted file mode 100644
index 67fb211e808..00000000000
Binary files a/_images/inset_locator_demo.png and /dev/null differ
diff --git a/_images/inset_locator_demo1.png b/_images/inset_locator_demo1.png
deleted file mode 100644
index 67fb211e808..00000000000
Binary files a/_images/inset_locator_demo1.png and /dev/null differ
diff --git a/_images/inset_locator_demo2.png b/_images/inset_locator_demo2.png
deleted file mode 100644
index 5b03524b8ec..00000000000
Binary files a/_images/inset_locator_demo2.png and /dev/null differ
diff --git a/_images/inset_locator_demo21.png b/_images/inset_locator_demo21.png
deleted file mode 100644
index 5b03524b8ec..00000000000
Binary files a/_images/inset_locator_demo21.png and /dev/null differ
diff --git a/_images/integral_demo.png b/_images/integral_demo.png
deleted file mode 100644
index 90f34b7a15d..00000000000
Binary files a/_images/integral_demo.png and /dev/null differ
diff --git a/_images/interp_demo.png b/_images/interp_demo.png
deleted file mode 100644
index 6d4f39136ff..00000000000
Binary files a/_images/interp_demo.png and /dev/null differ
diff --git a/_images/interpolation_methods.png b/_images/interpolation_methods.png
deleted file mode 100644
index 738eb298b26..00000000000
Binary files a/_images/interpolation_methods.png and /dev/null differ
diff --git a/_images/invert_axes.png b/_images/invert_axes.png
deleted file mode 100644
index c78d87ab634..00000000000
Binary files a/_images/invert_axes.png and /dev/null differ
diff --git a/_images/joinstyle.png b/_images/joinstyle.png
deleted file mode 100644
index e0399143caf..00000000000
Binary files a/_images/joinstyle.png and /dev/null differ
diff --git a/_images/layer_images.png b/_images/layer_images.png
deleted file mode 100644
index 56c2fb56934..00000000000
Binary files a/_images/layer_images.png and /dev/null differ
diff --git a/_images/leftventricle_bulleye.png b/_images/leftventricle_bulleye.png
deleted file mode 100644
index f68b966dccd..00000000000
Binary files a/_images/leftventricle_bulleye.png and /dev/null differ
diff --git a/_images/legend_demo.png b/_images/legend_demo.png
deleted file mode 100644
index 7a0a99787ad..00000000000
Binary files a/_images/legend_demo.png and /dev/null differ
diff --git a/_images/legend_demo1.png b/_images/legend_demo1.png
deleted file mode 100644
index 7a0a99787ad..00000000000
Binary files a/_images/legend_demo1.png and /dev/null differ
diff --git a/_images/legend_demo2.png b/_images/legend_demo2.png
deleted file mode 100644
index ddabf7f2a17..00000000000
Binary files a/_images/legend_demo2.png and /dev/null differ
diff --git a/_images/legend_demo3.png b/_images/legend_demo3.png
deleted file mode 100644
index e5ddea28ba4..00000000000
Binary files a/_images/legend_demo3.png and /dev/null differ
diff --git a/_images/legend_demo4.png b/_images/legend_demo4.png
deleted file mode 100644
index 103fe6a2f04..00000000000
Binary files a/_images/legend_demo4.png and /dev/null differ
diff --git a/_images/legend_demo41.png b/_images/legend_demo41.png
deleted file mode 100644
index 103fe6a2f04..00000000000
Binary files a/_images/legend_demo41.png and /dev/null differ
diff --git a/_images/legend_demo5.png b/_images/legend_demo5.png
deleted file mode 100644
index 36ec6970a77..00000000000
Binary files a/_images/legend_demo5.png and /dev/null differ
diff --git a/_images/legend_demo6.png b/_images/legend_demo6.png
deleted file mode 100644
index 7a0a99787ad..00000000000
Binary files a/_images/legend_demo6.png and /dev/null differ
diff --git a/_images/legend_demo7.png b/_images/legend_demo7.png
deleted file mode 100644
index 7a0a99787ad..00000000000
Binary files a/_images/legend_demo7.png and /dev/null differ
diff --git a/_images/legend_guide-1.png b/_images/legend_guide-1.png
deleted file mode 100644
index b09baddc089..00000000000
Binary files a/_images/legend_guide-1.png and /dev/null differ
diff --git a/_images/legend_guide-2.png b/_images/legend_guide-2.png
deleted file mode 100644
index 8e528297a58..00000000000
Binary files a/_images/legend_guide-2.png and /dev/null differ
diff --git a/_images/legend_guide-3.png b/_images/legend_guide-3.png
deleted file mode 100644
index ad606877c75..00000000000
Binary files a/_images/legend_guide-3.png and /dev/null differ
diff --git a/_images/legend_guide-4.png b/_images/legend_guide-4.png
deleted file mode 100644
index 6a294d17696..00000000000
Binary files a/_images/legend_guide-4.png and /dev/null differ
diff --git a/_images/legend_guide-5.png b/_images/legend_guide-5.png
deleted file mode 100644
index 14654a6d407..00000000000
Binary files a/_images/legend_guide-5.png and /dev/null differ
diff --git a/_images/legend_guide-6.png b/_images/legend_guide-6.png
deleted file mode 100644
index 65afcf993df..00000000000
Binary files a/_images/legend_guide-6.png and /dev/null differ
diff --git a/_images/lightness_00.png b/_images/lightness_00.png
deleted file mode 100644
index 65288c7fb13..00000000000
Binary files a/_images/lightness_00.png and /dev/null differ
diff --git a/_images/lightness_01.png b/_images/lightness_01.png
deleted file mode 100644
index 392ff428f58..00000000000
Binary files a/_images/lightness_01.png and /dev/null differ
diff --git a/_images/lightness_02.png b/_images/lightness_02.png
deleted file mode 100644
index 55b81ac73c9..00000000000
Binary files a/_images/lightness_02.png and /dev/null differ
diff --git a/_images/lightness_03.png b/_images/lightness_03.png
deleted file mode 100644
index 807722c645a..00000000000
Binary files a/_images/lightness_03.png and /dev/null differ
diff --git a/_images/lightness_04.png b/_images/lightness_04.png
deleted file mode 100644
index 2b5126bfa93..00000000000
Binary files a/_images/lightness_04.png and /dev/null differ
diff --git a/_images/lightness_05.png b/_images/lightness_05.png
deleted file mode 100644
index ba64258f5f8..00000000000
Binary files a/_images/lightness_05.png and /dev/null differ
diff --git a/_images/line_collection.png b/_images/line_collection.png
deleted file mode 100644
index 27d3a886869..00000000000
Binary files a/_images/line_collection.png and /dev/null differ
diff --git a/_images/line_collection2.png b/_images/line_collection2.png
deleted file mode 100644
index 485ab123cec..00000000000
Binary files a/_images/line_collection2.png and /dev/null differ
diff --git a/_images/line_demo_dash_control.png b/_images/line_demo_dash_control.png
deleted file mode 100644
index 7023ed6c667..00000000000
Binary files a/_images/line_demo_dash_control.png and /dev/null differ
diff --git a/_images/line_styles_reference.png b/_images/line_styles_reference.png
deleted file mode 100644
index e116eeb2f37..00000000000
Binary files a/_images/line_styles_reference.png and /dev/null differ
diff --git a/_images/line_with_text.png b/_images/line_with_text.png
deleted file mode 100644
index a9749be4922..00000000000
Binary files a/_images/line_with_text.png and /dev/null differ
diff --git a/_images/lines3d_demo.png b/_images/lines3d_demo.png
deleted file mode 100644
index 39ad58c079b..00000000000
Binary files a/_images/lines3d_demo.png and /dev/null differ
diff --git a/_images/lines3d_demo1.png b/_images/lines3d_demo1.png
deleted file mode 100644
index 39ad58c079b..00000000000
Binary files a/_images/lines3d_demo1.png and /dev/null differ
diff --git a/_images/linestyles.png b/_images/linestyles.png
deleted file mode 100644
index 6d041adf4a3..00000000000
Binary files a/_images/linestyles.png and /dev/null differ
diff --git a/_images/load_converter.png b/_images/load_converter.png
deleted file mode 100644
index 34e180f9c2c..00000000000
Binary files a/_images/load_converter.png and /dev/null differ
diff --git a/_images/loadrec.png b/_images/loadrec.png
deleted file mode 100644
index 86e9ff15bd9..00000000000
Binary files a/_images/loadrec.png and /dev/null differ
diff --git a/_images/log_bar.png b/_images/log_bar.png
deleted file mode 100644
index e0502a3a968..00000000000
Binary files a/_images/log_bar.png and /dev/null differ
diff --git a/_images/log_demo.png b/_images/log_demo.png
deleted file mode 100644
index c7c22d0d312..00000000000
Binary files a/_images/log_demo.png and /dev/null differ
diff --git a/_images/log_demo1.png b/_images/log_demo1.png
deleted file mode 100644
index c7c22d0d312..00000000000
Binary files a/_images/log_demo1.png and /dev/null differ
diff --git a/_images/log_demo2.png b/_images/log_demo2.png
deleted file mode 100644
index c7c22d0d312..00000000000
Binary files a/_images/log_demo2.png and /dev/null differ
diff --git a/_images/log_demo3.png b/_images/log_demo3.png
deleted file mode 100644
index c7c22d0d312..00000000000
Binary files a/_images/log_demo3.png and /dev/null differ
diff --git a/_images/log_test.png b/_images/log_test.png
deleted file mode 100644
index 04f14d804fc..00000000000
Binary files a/_images/log_test.png and /dev/null differ
diff --git a/_images/logo.png b/_images/logo.png
deleted file mode 100644
index 12032fdfb29..00000000000
Binary files a/_images/logo.png and /dev/null differ
diff --git a/_images/logo2.png b/_images/logo2.png
deleted file mode 100644
index eceefd8b34e..00000000000
Binary files a/_images/logo2.png and /dev/null differ
diff --git a/_images/lorenz_attractor.png b/_images/lorenz_attractor.png
deleted file mode 100644
index 74ca8749a8a..00000000000
Binary files a/_images/lorenz_attractor.png and /dev/null differ
diff --git a/_images/major_minor_demo1.png b/_images/major_minor_demo1.png
deleted file mode 100644
index 8ae969208f3..00000000000
Binary files a/_images/major_minor_demo1.png and /dev/null differ
diff --git a/_images/major_minor_demo2.png b/_images/major_minor_demo2.png
deleted file mode 100644
index 088bf3628f8..00000000000
Binary files a/_images/major_minor_demo2.png and /dev/null differ
diff --git a/_images/make_room_for_ylabel_using_axesgrid_00.png b/_images/make_room_for_ylabel_using_axesgrid_00.png
deleted file mode 100644
index 2d3c1841fcb..00000000000
Binary files a/_images/make_room_for_ylabel_using_axesgrid_00.png and /dev/null differ
diff --git a/_images/make_room_for_ylabel_using_axesgrid_01.png b/_images/make_room_for_ylabel_using_axesgrid_01.png
deleted file mode 100644
index 8bd27b5dd9e..00000000000
Binary files a/_images/make_room_for_ylabel_using_axesgrid_01.png and /dev/null differ
diff --git a/_images/make_room_for_ylabel_using_axesgrid_02.png b/_images/make_room_for_ylabel_using_axesgrid_02.png
deleted file mode 100644
index 10fa702d081..00000000000
Binary files a/_images/make_room_for_ylabel_using_axesgrid_02.png and /dev/null differ
diff --git a/_images/mandelbrot.png b/_images/mandelbrot.png
deleted file mode 100644
index 9b0b4d32f36..00000000000
Binary files a/_images/mandelbrot.png and /dev/null differ
diff --git a/_images/manual_axis.png b/_images/manual_axis.png
deleted file mode 100644
index 11501e5ed4c..00000000000
Binary files a/_images/manual_axis.png and /dev/null differ
diff --git a/_images/marker_fillstyle_reference.png b/_images/marker_fillstyle_reference.png
deleted file mode 100644
index 9f6a0993f9f..00000000000
Binary files a/_images/marker_fillstyle_reference.png and /dev/null differ
diff --git a/_images/marker_path.png b/_images/marker_path.png
deleted file mode 100644
index 01d7a215aa6..00000000000
Binary files a/_images/marker_path.png and /dev/null differ
diff --git a/_images/marker_reference_00.png b/_images/marker_reference_00.png
deleted file mode 100644
index b723029b48b..00000000000
Binary files a/_images/marker_reference_00.png and /dev/null differ
diff --git a/_images/marker_reference_01.png b/_images/marker_reference_01.png
deleted file mode 100644
index 890221d06c8..00000000000
Binary files a/_images/marker_reference_01.png and /dev/null differ
diff --git a/_images/markevery_demo_00.png b/_images/markevery_demo_00.png
deleted file mode 100644
index 356ff6e905b..00000000000
Binary files a/_images/markevery_demo_00.png and /dev/null differ
diff --git a/_images/markevery_demo_01.png b/_images/markevery_demo_01.png
deleted file mode 100644
index 4adefefb50a..00000000000
Binary files a/_images/markevery_demo_01.png and /dev/null differ
diff --git a/_images/markevery_demo_02.png b/_images/markevery_demo_02.png
deleted file mode 100644
index 352d50a89c3..00000000000
Binary files a/_images/markevery_demo_02.png and /dev/null differ
diff --git a/_images/markevery_demo_03.png b/_images/markevery_demo_03.png
deleted file mode 100644
index 44fa02de85a..00000000000
Binary files a/_images/markevery_demo_03.png and /dev/null differ
diff --git a/_images/masked_demo.png b/_images/masked_demo.png
deleted file mode 100644
index 9bed299e36d..00000000000
Binary files a/_images/masked_demo.png and /dev/null differ
diff --git a/_images/mathtext_asarray.png b/_images/mathtext_asarray.png
deleted file mode 100644
index 7f2f2f5a0d8..00000000000
Binary files a/_images/mathtext_asarray.png and /dev/null differ
diff --git a/_images/mathtext_demo.png b/_images/mathtext_demo.png
deleted file mode 100644
index f303d3d518b..00000000000
Binary files a/_images/mathtext_demo.png and /dev/null differ
diff --git a/_images/mathtext_examples_01_00.png b/_images/mathtext_examples_01_00.png
deleted file mode 100644
index 64fd09ab1f3..00000000000
Binary files a/_images/mathtext_examples_01_00.png and /dev/null differ
diff --git a/_images/mathtext_examples_01_001.png b/_images/mathtext_examples_01_001.png
deleted file mode 100644
index 64fd09ab1f3..00000000000
Binary files a/_images/mathtext_examples_01_001.png and /dev/null differ
diff --git a/_images/matshow.png b/_images/matshow.png
deleted file mode 100644
index ea5389dd07c..00000000000
Binary files a/_images/matshow.png and /dev/null differ
diff --git a/_images/matshow1.png b/_images/matshow1.png
deleted file mode 100644
index ea5389dd07c..00000000000
Binary files a/_images/matshow1.png and /dev/null differ
diff --git a/_images/mixed_subplots_demo.png b/_images/mixed_subplots_demo.png
deleted file mode 100644
index b9f30dbbec8..00000000000
Binary files a/_images/mixed_subplots_demo.png and /dev/null differ
diff --git a/_images/mixed_subplots_demo1.png b/_images/mixed_subplots_demo1.png
deleted file mode 100644
index b9f30dbbec8..00000000000
Binary files a/_images/mixed_subplots_demo1.png and /dev/null differ
diff --git a/_images/mri_demo.png b/_images/mri_demo.png
deleted file mode 100644
index f38d302f483..00000000000
Binary files a/_images/mri_demo.png and /dev/null differ
diff --git a/_images/mri_with_eeg.png b/_images/mri_with_eeg.png
deleted file mode 100644
index a8682b0cfc1..00000000000
Binary files a/_images/mri_with_eeg.png and /dev/null differ
diff --git a/_images/multi_image.png b/_images/multi_image.png
deleted file mode 100644
index 593a534fbb5..00000000000
Binary files a/_images/multi_image.png and /dev/null differ
diff --git a/_images/multicolored_line_00.png b/_images/multicolored_line_00.png
deleted file mode 100644
index 9b23844e1cb..00000000000
Binary files a/_images/multicolored_line_00.png and /dev/null differ
diff --git a/_images/multicolored_line_01.png b/_images/multicolored_line_01.png
deleted file mode 100644
index 2b9a549bce3..00000000000
Binary files a/_images/multicolored_line_01.png and /dev/null differ
diff --git a/_images/multiline.png b/_images/multiline.png
deleted file mode 100644
index 0ab3d1faf39..00000000000
Binary files a/_images/multiline.png and /dev/null differ
diff --git a/_images/multiple_figs_demo_00.png b/_images/multiple_figs_demo_00.png
deleted file mode 100644
index ff2c58cc938..00000000000
Binary files a/_images/multiple_figs_demo_00.png and /dev/null differ
diff --git a/_images/multiple_figs_demo_01.png b/_images/multiple_figs_demo_01.png
deleted file mode 100644
index aae4b2641e9..00000000000
Binary files a/_images/multiple_figs_demo_01.png and /dev/null differ
diff --git a/_images/multiple_histograms_side_by_side.png b/_images/multiple_histograms_side_by_side.png
deleted file mode 100644
index e5f0f6e4f46..00000000000
Binary files a/_images/multiple_histograms_side_by_side.png and /dev/null differ
diff --git a/_images/multiple_yaxis_with_spines.png b/_images/multiple_yaxis_with_spines.png
deleted file mode 100644
index 78852a5554f..00000000000
Binary files a/_images/multiple_yaxis_with_spines.png and /dev/null differ
diff --git a/_images/named_colors.png b/_images/named_colors.png
deleted file mode 100644
index 9dfe14a46df..00000000000
Binary files a/_images/named_colors.png and /dev/null differ
diff --git a/_images/nan_test.png b/_images/nan_test.png
deleted file mode 100644
index 2f4d0a314c7..00000000000
Binary files a/_images/nan_test.png and /dev/null differ
diff --git a/_images/newscalarformatter_demo_00.png b/_images/newscalarformatter_demo_00.png
deleted file mode 100644
index cdf26d3511e..00000000000
Binary files a/_images/newscalarformatter_demo_00.png and /dev/null differ
diff --git a/_images/newscalarformatter_demo_01.png b/_images/newscalarformatter_demo_01.png
deleted file mode 100644
index 0a697c59e87..00000000000
Binary files a/_images/newscalarformatter_demo_01.png and /dev/null differ
diff --git a/_images/newscalarformatter_demo_02.png b/_images/newscalarformatter_demo_02.png
deleted file mode 100644
index 171966c5eb7..00000000000
Binary files a/_images/newscalarformatter_demo_02.png and /dev/null differ
diff --git a/_images/newscalarformatter_demo_03.png b/_images/newscalarformatter_demo_03.png
deleted file mode 100644
index 9c593de55ed..00000000000
Binary files a/_images/newscalarformatter_demo_03.png and /dev/null differ
diff --git a/_images/offset_demo.png b/_images/offset_demo.png
deleted file mode 100644
index 91d63ba6b67..00000000000
Binary files a/_images/offset_demo.png and /dev/null differ
diff --git a/_images/offset_demo1.png b/_images/offset_demo1.png
deleted file mode 100644
index 91d63ba6b67..00000000000
Binary files a/_images/offset_demo1.png and /dev/null differ
diff --git a/_images/parasite_simple.png b/_images/parasite_simple.png
deleted file mode 100644
index 36086c4ffd6..00000000000
Binary files a/_images/parasite_simple.png and /dev/null differ
diff --git a/_images/parasite_simple2.png b/_images/parasite_simple2.png
deleted file mode 100644
index 6c4a20ead69..00000000000
Binary files a/_images/parasite_simple2.png and /dev/null differ
diff --git a/_images/parasite_simple21.png b/_images/parasite_simple21.png
deleted file mode 100644
index 6c4a20ead69..00000000000
Binary files a/_images/parasite_simple21.png and /dev/null differ
diff --git a/_images/patch_collection.png b/_images/patch_collection.png
deleted file mode 100644
index d8a7e8bf8ad..00000000000
Binary files a/_images/patch_collection.png and /dev/null differ
diff --git a/_images/path_patch_demo.png b/_images/path_patch_demo.png
deleted file mode 100644
index 49a853d7f85..00000000000
Binary files a/_images/path_patch_demo.png and /dev/null differ
diff --git a/_images/path_patch_demo1.png b/_images/path_patch_demo1.png
deleted file mode 100644
index 49a853d7f85..00000000000
Binary files a/_images/path_patch_demo1.png and /dev/null differ
diff --git a/_images/path_tutorial-1.png b/_images/path_tutorial-1.png
deleted file mode 100644
index e12b8c62c9c..00000000000
Binary files a/_images/path_tutorial-1.png and /dev/null differ
diff --git a/_images/path_tutorial-2.png b/_images/path_tutorial-2.png
deleted file mode 100644
index 07d339e8946..00000000000
Binary files a/_images/path_tutorial-2.png and /dev/null differ
diff --git a/_images/patheffect_demo.png b/_images/patheffect_demo.png
deleted file mode 100644
index 6237dc7f521..00000000000
Binary files a/_images/patheffect_demo.png and /dev/null differ
diff --git a/_images/patheffect_demo1.png b/_images/patheffect_demo1.png
deleted file mode 100644
index 6237dc7f521..00000000000
Binary files a/_images/patheffect_demo1.png and /dev/null differ
diff --git a/_images/patheffects_guide-1.png b/_images/patheffects_guide-1.png
deleted file mode 100644
index e767bb52ee4..00000000000
Binary files a/_images/patheffects_guide-1.png and /dev/null differ
diff --git a/_images/patheffects_guide-2.png b/_images/patheffects_guide-2.png
deleted file mode 100644
index f8dfb540869..00000000000
Binary files a/_images/patheffects_guide-2.png and /dev/null differ
diff --git a/_images/patheffects_guide-3.png b/_images/patheffects_guide-3.png
deleted file mode 100644
index 38ffcf45fdc..00000000000
Binary files a/_images/patheffects_guide-3.png and /dev/null differ
diff --git a/_images/patheffects_guide-4.png b/_images/patheffects_guide-4.png
deleted file mode 100644
index fe3b3047a40..00000000000
Binary files a/_images/patheffects_guide-4.png and /dev/null differ
diff --git a/_images/pathpatch3d_demo.png b/_images/pathpatch3d_demo.png
deleted file mode 100644
index 65ebd62d439..00000000000
Binary files a/_images/pathpatch3d_demo.png and /dev/null differ
diff --git a/_images/pcolor_demo.png b/_images/pcolor_demo.png
deleted file mode 100644
index b074cb383a0..00000000000
Binary files a/_images/pcolor_demo.png and /dev/null differ
diff --git a/_images/pcolor_log.png b/_images/pcolor_log.png
deleted file mode 100644
index 1b2e3917d63..00000000000
Binary files a/_images/pcolor_log.png and /dev/null differ
diff --git a/_images/pcolor_small.png b/_images/pcolor_small.png
deleted file mode 100644
index 5999cf016d8..00000000000
Binary files a/_images/pcolor_small.png and /dev/null differ
diff --git a/_images/pcolormesh_levels.png b/_images/pcolormesh_levels.png
deleted file mode 100644
index c93428e05f8..00000000000
Binary files a/_images/pcolormesh_levels.png and /dev/null differ
diff --git a/_images/pgf_fonts.png b/_images/pgf_fonts.png
deleted file mode 100644
index d4ef689f9b3..00000000000
Binary files a/_images/pgf_fonts.png and /dev/null differ
diff --git a/_images/pgf_texsystem.png b/_images/pgf_texsystem.png
deleted file mode 100644
index 6075e7b764d..00000000000
Binary files a/_images/pgf_texsystem.png and /dev/null differ
diff --git a/_images/pie_demo2.png b/_images/pie_demo2.png
deleted file mode 100644
index 64b194edfd5..00000000000
Binary files a/_images/pie_demo2.png and /dev/null differ
diff --git a/_images/pie_demo_features.png b/_images/pie_demo_features.png
deleted file mode 100644
index 7f2127476e6..00000000000
Binary files a/_images/pie_demo_features.png and /dev/null differ
diff --git a/_images/pie_demo_features1.png b/_images/pie_demo_features1.png
deleted file mode 100644
index 7f2127476e6..00000000000
Binary files a/_images/pie_demo_features1.png and /dev/null differ
diff --git a/_images/pie_demo_features2.png b/_images/pie_demo_features2.png
deleted file mode 100644
index 7f2127476e6..00000000000
Binary files a/_images/pie_demo_features2.png and /dev/null differ
diff --git a/_images/pie_demo_features3.png b/_images/pie_demo_features3.png
deleted file mode 100644
index 7f2127476e6..00000000000
Binary files a/_images/pie_demo_features3.png and /dev/null differ
diff --git a/_images/plot_bmh.png b/_images/plot_bmh.png
deleted file mode 100644
index 185180616c8..00000000000
Binary files a/_images/plot_bmh.png and /dev/null differ
diff --git a/_images/plot_dark_background.png b/_images/plot_dark_background.png
deleted file mode 100644
index 8b811ae072c..00000000000
Binary files a/_images/plot_dark_background.png and /dev/null differ
diff --git a/_images/plot_fivethirtyeight.png b/_images/plot_fivethirtyeight.png
deleted file mode 100644
index 95c85d96efe..00000000000
Binary files a/_images/plot_fivethirtyeight.png and /dev/null differ
diff --git a/_images/plot_ggplot.png b/_images/plot_ggplot.png
deleted file mode 100644
index c2e0cb4509d..00000000000
Binary files a/_images/plot_ggplot.png and /dev/null differ
diff --git a/_images/plot_grayscale.png b/_images/plot_grayscale.png
deleted file mode 100644
index b46c0747006..00000000000
Binary files a/_images/plot_grayscale.png and /dev/null differ
diff --git a/_images/plotfile_demo_00.png b/_images/plotfile_demo_00.png
deleted file mode 100644
index bd7a59045f2..00000000000
Binary files a/_images/plotfile_demo_00.png and /dev/null differ
diff --git a/_images/plotfile_demo_01.png b/_images/plotfile_demo_01.png
deleted file mode 100644
index bd7a59045f2..00000000000
Binary files a/_images/plotfile_demo_01.png and /dev/null differ
diff --git a/_images/plotfile_demo_02.png b/_images/plotfile_demo_02.png
deleted file mode 100644
index 7f5ce34d854..00000000000
Binary files a/_images/plotfile_demo_02.png and /dev/null differ
diff --git a/_images/plotfile_demo_03.png b/_images/plotfile_demo_03.png
deleted file mode 100644
index 7f5ce34d854..00000000000
Binary files a/_images/plotfile_demo_03.png and /dev/null differ
diff --git a/_images/plotfile_demo_04.png b/_images/plotfile_demo_04.png
deleted file mode 100644
index daa778669af..00000000000
Binary files a/_images/plotfile_demo_04.png and /dev/null differ
diff --git a/_images/plotfile_demo_05.png b/_images/plotfile_demo_05.png
deleted file mode 100644
index 3a47357216b..00000000000
Binary files a/_images/plotfile_demo_05.png and /dev/null differ
diff --git a/_images/plotfile_demo_06.png b/_images/plotfile_demo_06.png
deleted file mode 100644
index 743d26a2814..00000000000
Binary files a/_images/plotfile_demo_06.png and /dev/null differ
diff --git a/_images/plotfile_demo_07.png b/_images/plotfile_demo_07.png
deleted file mode 100644
index 26add26857f..00000000000
Binary files a/_images/plotfile_demo_07.png and /dev/null differ
diff --git a/_images/polar_bar_demo.png b/_images/polar_bar_demo.png
deleted file mode 100644
index 0559ebdbe39..00000000000
Binary files a/_images/polar_bar_demo.png and /dev/null differ
diff --git a/_images/polar_demo.png b/_images/polar_demo.png
deleted file mode 100644
index 3870db5ba60..00000000000
Binary files a/_images/polar_demo.png and /dev/null differ
diff --git a/_images/polar_demo1.png b/_images/polar_demo1.png
deleted file mode 100644
index 3870db5ba60..00000000000
Binary files a/_images/polar_demo1.png and /dev/null differ
diff --git a/_images/polar_legend.png b/_images/polar_legend.png
deleted file mode 100644
index ab1b69d053a..00000000000
Binary files a/_images/polar_legend.png and /dev/null differ
diff --git a/_images/polar_scatter_demo.png b/_images/polar_scatter_demo.png
deleted file mode 100644
index 56596c82690..00000000000
Binary files a/_images/polar_scatter_demo.png and /dev/null differ
diff --git a/_images/polys3d_demo.png b/_images/polys3d_demo.png
deleted file mode 100644
index 5a181c87231..00000000000
Binary files a/_images/polys3d_demo.png and /dev/null differ
diff --git a/_images/polys3d_demo1.png b/_images/polys3d_demo1.png
deleted file mode 100644
index 5a181c87231..00000000000
Binary files a/_images/polys3d_demo1.png and /dev/null differ
diff --git a/_images/power_norm_demo.png b/_images/power_norm_demo.png
deleted file mode 100644
index 67af51a170c..00000000000
Binary files a/_images/power_norm_demo.png and /dev/null differ
diff --git a/_images/psd_demo2.png b/_images/psd_demo2.png
deleted file mode 100644
index 91182663ccb..00000000000
Binary files a/_images/psd_demo2.png and /dev/null differ
diff --git a/_images/psd_demo3.png b/_images/psd_demo3.png
deleted file mode 100644
index 18e11b52357..00000000000
Binary files a/_images/psd_demo3.png and /dev/null differ
diff --git a/_images/psd_demo_00_00.png b/_images/psd_demo_00_00.png
deleted file mode 100644
index 6db14e94b85..00000000000
Binary files a/_images/psd_demo_00_00.png and /dev/null differ
diff --git a/_images/psd_demo_00_001.png b/_images/psd_demo_00_001.png
deleted file mode 100644
index 6db14e94b85..00000000000
Binary files a/_images/psd_demo_00_001.png and /dev/null differ
diff --git a/_images/psd_demo_00_002.png b/_images/psd_demo_00_002.png
deleted file mode 100644
index 6db14e94b85..00000000000
Binary files a/_images/psd_demo_00_002.png and /dev/null differ
diff --git a/_images/psd_demo_complex.png b/_images/psd_demo_complex.png
deleted file mode 100644
index 4c1ef8d069d..00000000000
Binary files a/_images/psd_demo_complex.png and /dev/null differ
diff --git a/_images/pyplot_annotate.png b/_images/pyplot_annotate.png
deleted file mode 100644
index 18c5e2b254d..00000000000
Binary files a/_images/pyplot_annotate.png and /dev/null differ
diff --git a/_images/pyplot_formatstr.png b/_images/pyplot_formatstr.png
deleted file mode 100644
index 400a20a4e18..00000000000
Binary files a/_images/pyplot_formatstr.png and /dev/null differ
diff --git a/_images/pyplot_mathtext.png b/_images/pyplot_mathtext.png
deleted file mode 100644
index 8f7530d5edc..00000000000
Binary files a/_images/pyplot_mathtext.png and /dev/null differ
diff --git a/_images/pyplot_scales.png b/_images/pyplot_scales.png
deleted file mode 100644
index 2ae2cb2ffa9..00000000000
Binary files a/_images/pyplot_scales.png and /dev/null differ
diff --git a/_images/pyplot_simple.png b/_images/pyplot_simple.png
deleted file mode 100644
index 6d321d4651d..00000000000
Binary files a/_images/pyplot_simple.png and /dev/null differ
diff --git a/_images/pyplot_text.png b/_images/pyplot_text.png
deleted file mode 100644
index 6969581bda3..00000000000
Binary files a/_images/pyplot_text.png and /dev/null differ
diff --git a/_images/pyplot_three.png b/_images/pyplot_three.png
deleted file mode 100644
index 5be322070da..00000000000
Binary files a/_images/pyplot_three.png and /dev/null differ
diff --git a/_images/pyplot_two_subplots.png b/_images/pyplot_two_subplots.png
deleted file mode 100644
index 2adfd01c84e..00000000000
Binary files a/_images/pyplot_two_subplots.png and /dev/null differ
diff --git a/_images/pythonic_matplotlib.png b/_images/pythonic_matplotlib.png
deleted file mode 100644
index 10404aa1b93..00000000000
Binary files a/_images/pythonic_matplotlib.png and /dev/null differ
diff --git a/_images/quad_bezier.png b/_images/quad_bezier.png
deleted file mode 100644
index 460b59e861e..00000000000
Binary files a/_images/quad_bezier.png and /dev/null differ
diff --git a/_images/quadmesh_demo.png b/_images/quadmesh_demo.png
deleted file mode 100644
index 38864c910a8..00000000000
Binary files a/_images/quadmesh_demo.png and /dev/null differ
diff --git a/_images/quiver3d_demo.png b/_images/quiver3d_demo.png
deleted file mode 100644
index f3a6e2a5383..00000000000
Binary files a/_images/quiver3d_demo.png and /dev/null differ
diff --git a/_images/quiver3d_demo1.png b/_images/quiver3d_demo1.png
deleted file mode 100644
index f3a6e2a5383..00000000000
Binary files a/_images/quiver3d_demo1.png and /dev/null differ
diff --git a/_images/quiver3d_demo2.png b/_images/quiver3d_demo2.png
deleted file mode 100644
index f3a6e2a5383..00000000000
Binary files a/_images/quiver3d_demo2.png and /dev/null differ
diff --git a/_images/quiver_demo_00.png b/_images/quiver_demo_00.png
deleted file mode 100644
index a46fe68bb4b..00000000000
Binary files a/_images/quiver_demo_00.png and /dev/null differ
diff --git a/_images/quiver_demo_01.png b/_images/quiver_demo_01.png
deleted file mode 100644
index 5bb95b4b339..00000000000
Binary files a/_images/quiver_demo_01.png and /dev/null differ
diff --git a/_images/quiver_demo_02.png b/_images/quiver_demo_02.png
deleted file mode 100644
index 198ae8b015a..00000000000
Binary files a/_images/quiver_demo_02.png and /dev/null differ
diff --git a/_images/quiver_simple_demo.png b/_images/quiver_simple_demo.png
deleted file mode 100644
index 665b0624521..00000000000
Binary files a/_images/quiver_simple_demo.png and /dev/null differ
diff --git a/_images/quiver_simple_demo1.png b/_images/quiver_simple_demo1.png
deleted file mode 100644
index 665b0624521..00000000000
Binary files a/_images/quiver_simple_demo1.png and /dev/null differ
diff --git a/_images/quiver_simple_demo2.png b/_images/quiver_simple_demo2.png
deleted file mode 100644
index 665b0624521..00000000000
Binary files a/_images/quiver_simple_demo2.png and /dev/null differ
diff --git a/_images/radar_chart.png b/_images/radar_chart.png
deleted file mode 100644
index 2e5392c44d7..00000000000
Binary files a/_images/radar_chart.png and /dev/null differ
diff --git a/_images/radian_demo.png b/_images/radian_demo.png
deleted file mode 100644
index 6d97b076180..00000000000
Binary files a/_images/radian_demo.png and /dev/null differ
diff --git a/_images/rainbow_text.png b/_images/rainbow_text.png
deleted file mode 100644
index 05e76999910..00000000000
Binary files a/_images/rainbow_text.png and /dev/null differ
diff --git a/_images/rasterization_demo.png b/_images/rasterization_demo.png
deleted file mode 100644
index 7e4dc1f146f..00000000000
Binary files a/_images/rasterization_demo.png and /dev/null differ
diff --git a/_images/recipes-2.png b/_images/recipes-2.png
deleted file mode 100644
index 9318cd9c5c5..00000000000
Binary files a/_images/recipes-2.png and /dev/null differ
diff --git a/_images/recipes-3.png b/_images/recipes-3.png
deleted file mode 100644
index 805a82e1491..00000000000
Binary files a/_images/recipes-3.png and /dev/null differ
diff --git a/_images/recipes-4.png b/_images/recipes-4.png
deleted file mode 100644
index adff4b72541..00000000000
Binary files a/_images/recipes-4.png and /dev/null differ
diff --git a/_images/recipes-5.png b/_images/recipes-5.png
deleted file mode 100644
index 54dfdc5f6ed..00000000000
Binary files a/_images/recipes-5.png and /dev/null differ
diff --git a/_images/recipes-6.png b/_images/recipes-6.png
deleted file mode 100644
index 5697416ae4e..00000000000
Binary files a/_images/recipes-6.png and /dev/null differ
diff --git a/_images/recipes-7.png b/_images/recipes-7.png
deleted file mode 100644
index ff83ff02290..00000000000
Binary files a/_images/recipes-7.png and /dev/null differ
diff --git a/_images/recipes-8.png b/_images/recipes-8.png
deleted file mode 100644
index 61099a6a67f..00000000000
Binary files a/_images/recipes-8.png and /dev/null differ
diff --git a/_images/rotate_axes3d_demo.png b/_images/rotate_axes3d_demo.png
deleted file mode 100644
index eb6f793269f..00000000000
Binary files a/_images/rotate_axes3d_demo.png and /dev/null differ
diff --git a/_images/sample_data_demo.png b/_images/sample_data_demo.png
deleted file mode 100644
index c13a4be6ac5..00000000000
Binary files a/_images/sample_data_demo.png and /dev/null differ
diff --git a/_images/sankey_demo_basics_00.png b/_images/sankey_demo_basics_00.png
deleted file mode 100644
index d3c519d7fa5..00000000000
Binary files a/_images/sankey_demo_basics_00.png and /dev/null differ
diff --git a/_images/sankey_demo_basics_001.png b/_images/sankey_demo_basics_001.png
deleted file mode 100644
index d3c519d7fa5..00000000000
Binary files a/_images/sankey_demo_basics_001.png and /dev/null differ
diff --git a/_images/sankey_demo_basics_01.png b/_images/sankey_demo_basics_01.png
deleted file mode 100644
index 396a0b36d86..00000000000
Binary files a/_images/sankey_demo_basics_01.png and /dev/null differ
diff --git a/_images/sankey_demo_basics_011.png b/_images/sankey_demo_basics_011.png
deleted file mode 100644
index 396a0b36d86..00000000000
Binary files a/_images/sankey_demo_basics_011.png and /dev/null differ
diff --git a/_images/sankey_demo_basics_02.png b/_images/sankey_demo_basics_02.png
deleted file mode 100644
index 114b7b855f2..00000000000
Binary files a/_images/sankey_demo_basics_02.png and /dev/null differ
diff --git a/_images/sankey_demo_basics_021.png b/_images/sankey_demo_basics_021.png
deleted file mode 100644
index 114b7b855f2..00000000000
Binary files a/_images/sankey_demo_basics_021.png and /dev/null differ
diff --git a/_images/sankey_demo_links.png b/_images/sankey_demo_links.png
deleted file mode 100644
index b85bac224ff..00000000000
Binary files a/_images/sankey_demo_links.png and /dev/null differ
diff --git a/_images/sankey_demo_old.png b/_images/sankey_demo_old.png
deleted file mode 100644
index d8a9b812610..00000000000
Binary files a/_images/sankey_demo_old.png and /dev/null differ
diff --git a/_images/sankey_demo_rankine.png b/_images/sankey_demo_rankine.png
deleted file mode 100644
index caa316a19d8..00000000000
Binary files a/_images/sankey_demo_rankine.png and /dev/null differ
diff --git a/_images/sankey_demo_rankine1.png b/_images/sankey_demo_rankine1.png
deleted file mode 100644
index caa316a19d8..00000000000
Binary files a/_images/sankey_demo_rankine1.png and /dev/null differ
diff --git a/_images/scales.png b/_images/scales.png
deleted file mode 100644
index e089720ce95..00000000000
Binary files a/_images/scales.png and /dev/null differ
diff --git a/_images/scatter3d_demo.png b/_images/scatter3d_demo.png
deleted file mode 100644
index af08326f1ca..00000000000
Binary files a/_images/scatter3d_demo.png and /dev/null differ
diff --git a/_images/scatter3d_demo1.png b/_images/scatter3d_demo1.png
deleted file mode 100644
index af08326f1ca..00000000000
Binary files a/_images/scatter3d_demo1.png and /dev/null differ
diff --git a/_images/scatter_custom_symbol.png b/_images/scatter_custom_symbol.png
deleted file mode 100644
index fd0df0894d6..00000000000
Binary files a/_images/scatter_custom_symbol.png and /dev/null differ
diff --git a/_images/scatter_demo.png b/_images/scatter_demo.png
deleted file mode 100644
index 0d2c23c016e..00000000000
Binary files a/_images/scatter_demo.png and /dev/null differ
diff --git a/_images/scatter_demo1.png b/_images/scatter_demo1.png
deleted file mode 100644
index 0d2c23c016e..00000000000
Binary files a/_images/scatter_demo1.png and /dev/null differ
diff --git a/_images/scatter_demo2.png b/_images/scatter_demo2.png
deleted file mode 100644
index 5dadc81a6e8..00000000000
Binary files a/_images/scatter_demo2.png and /dev/null differ
diff --git a/_images/scatter_demo21.png b/_images/scatter_demo21.png
deleted file mode 100644
index 5dadc81a6e8..00000000000
Binary files a/_images/scatter_demo21.png and /dev/null differ
diff --git a/_images/scatter_demo3.png b/_images/scatter_demo3.png
deleted file mode 100644
index 0d2c23c016e..00000000000
Binary files a/_images/scatter_demo3.png and /dev/null differ
diff --git a/_images/scatter_hist.png b/_images/scatter_hist.png
deleted file mode 100644
index 9ab4fdfcab9..00000000000
Binary files a/_images/scatter_hist.png and /dev/null differ
diff --git a/_images/scatter_hist1.png b/_images/scatter_hist1.png
deleted file mode 100644
index 94bb830544b..00000000000
Binary files a/_images/scatter_hist1.png and /dev/null differ
diff --git a/_images/scatter_hist2.png b/_images/scatter_hist2.png
deleted file mode 100644
index d3e09863f0c..00000000000
Binary files a/_images/scatter_hist2.png and /dev/null differ
diff --git a/_images/scatter_masked.png b/_images/scatter_masked.png
deleted file mode 100644
index e59faa37015..00000000000
Binary files a/_images/scatter_masked.png and /dev/null differ
diff --git a/_images/scatter_piecharts.png b/_images/scatter_piecharts.png
deleted file mode 100644
index 38ea81ffe09..00000000000
Binary files a/_images/scatter_piecharts.png and /dev/null differ
diff --git a/_images/scatter_profile.png b/_images/scatter_profile.png
deleted file mode 100644
index 8a17e7fdfa0..00000000000
Binary files a/_images/scatter_profile.png and /dev/null differ
diff --git a/_images/scatter_star_poly.png b/_images/scatter_star_poly.png
deleted file mode 100644
index 2f6c377b4ad..00000000000
Binary files a/_images/scatter_star_poly.png and /dev/null differ
diff --git a/_images/scatter_symbol.png b/_images/scatter_symbol.png
deleted file mode 100644
index bad859a2e52..00000000000
Binary files a/_images/scatter_symbol.png and /dev/null differ
diff --git a/_images/scatter_with_legend.png b/_images/scatter_with_legend.png
deleted file mode 100644
index e9431804e8c..00000000000
Binary files a/_images/scatter_with_legend.png and /dev/null differ
diff --git a/_images/set_and_get.png b/_images/set_and_get.png
deleted file mode 100644
index d8750891ee8..00000000000
Binary files a/_images/set_and_get.png and /dev/null differ
diff --git a/_images/shading_example_01_00.png b/_images/shading_example_01_00.png
deleted file mode 100644
index 58d6f69606d..00000000000
Binary files a/_images/shading_example_01_00.png and /dev/null differ
diff --git a/_images/shading_example_01_01.png b/_images/shading_example_01_01.png
deleted file mode 100644
index 5085875083a..00000000000
Binary files a/_images/shading_example_01_01.png and /dev/null differ
diff --git a/_images/shared_axis_across_figures_00.png b/_images/shared_axis_across_figures_00.png
deleted file mode 100644
index 2728bb4df36..00000000000
Binary files a/_images/shared_axis_across_figures_00.png and /dev/null differ
diff --git a/_images/shared_axis_across_figures_01.png b/_images/shared_axis_across_figures_01.png
deleted file mode 100644
index fae7acf0431..00000000000
Binary files a/_images/shared_axis_across_figures_01.png and /dev/null differ
diff --git a/_images/shared_axis_demo.png b/_images/shared_axis_demo.png
deleted file mode 100644
index 69566adf526..00000000000
Binary files a/_images/shared_axis_demo.png and /dev/null differ
diff --git a/_images/simple_anchored_artists.png b/_images/simple_anchored_artists.png
deleted file mode 100644
index 302c01065de..00000000000
Binary files a/_images/simple_anchored_artists.png and /dev/null differ
diff --git a/_images/simple_anchored_artists1.png b/_images/simple_anchored_artists1.png
deleted file mode 100644
index 302c01065de..00000000000
Binary files a/_images/simple_anchored_artists1.png and /dev/null differ
diff --git a/_images/simple_axes_divider2.png b/_images/simple_axes_divider2.png
deleted file mode 100644
index b4d1924c76d..00000000000
Binary files a/_images/simple_axes_divider2.png and /dev/null differ
diff --git a/_images/simple_axes_divider3.png b/_images/simple_axes_divider3.png
deleted file mode 100644
index 4d2ab884e87..00000000000
Binary files a/_images/simple_axes_divider3.png and /dev/null differ
diff --git a/_images/simple_axesgrid.png b/_images/simple_axesgrid.png
deleted file mode 100644
index 29f77476284..00000000000
Binary files a/_images/simple_axesgrid.png and /dev/null differ
diff --git a/_images/simple_axesgrid1.png b/_images/simple_axesgrid1.png
deleted file mode 100644
index 29f77476284..00000000000
Binary files a/_images/simple_axesgrid1.png and /dev/null differ
diff --git a/_images/simple_axesgrid2.png b/_images/simple_axesgrid2.png
deleted file mode 100644
index a1dbac3bed3..00000000000
Binary files a/_images/simple_axesgrid2.png and /dev/null differ
diff --git a/_images/simple_axesgrid21.png b/_images/simple_axesgrid21.png
deleted file mode 100644
index a1dbac3bed3..00000000000
Binary files a/_images/simple_axesgrid21.png and /dev/null differ
diff --git a/_images/simple_axis_direction01.png b/_images/simple_axis_direction01.png
deleted file mode 100644
index e30e2608cc6..00000000000
Binary files a/_images/simple_axis_direction01.png and /dev/null differ
diff --git a/_images/simple_axis_direction03.png b/_images/simple_axis_direction03.png
deleted file mode 100644
index 576bbbb4b19..00000000000
Binary files a/_images/simple_axis_direction03.png and /dev/null differ
diff --git a/_images/simple_axis_pad.png b/_images/simple_axis_pad.png
deleted file mode 100644
index 49e530322ec..00000000000
Binary files a/_images/simple_axis_pad.png and /dev/null differ
diff --git a/_images/simple_axisartist1.png b/_images/simple_axisartist1.png
deleted file mode 100644
index cbbfde192a6..00000000000
Binary files a/_images/simple_axisartist1.png and /dev/null differ
diff --git a/_images/simple_axisline3.png b/_images/simple_axisline3.png
deleted file mode 100644
index edf75bf991c..00000000000
Binary files a/_images/simple_axisline3.png and /dev/null differ
diff --git a/_images/simple_axisline4.png b/_images/simple_axisline4.png
deleted file mode 100644
index f7f0132c7c9..00000000000
Binary files a/_images/simple_axisline4.png and /dev/null differ
diff --git a/_images/simple_axisline41.png b/_images/simple_axisline41.png
deleted file mode 100644
index f7f0132c7c9..00000000000
Binary files a/_images/simple_axisline41.png and /dev/null differ
diff --git a/_images/simple_colorbar.png b/_images/simple_colorbar.png
deleted file mode 100644
index ddb2edf19b8..00000000000
Binary files a/_images/simple_colorbar.png and /dev/null differ
diff --git a/_images/simple_legend01.png b/_images/simple_legend01.png
deleted file mode 100644
index 752013c8742..00000000000
Binary files a/_images/simple_legend01.png and /dev/null differ
diff --git a/_images/simple_legend02.png b/_images/simple_legend02.png
deleted file mode 100644
index 99e2468b1f6..00000000000
Binary files a/_images/simple_legend02.png and /dev/null differ
diff --git a/_images/simple_plot.png b/_images/simple_plot.png
deleted file mode 100644
index 47fcde7096c..00000000000
Binary files a/_images/simple_plot.png and /dev/null differ
diff --git a/_images/simple_plot1.png b/_images/simple_plot1.png
deleted file mode 100644
index 47fcde7096c..00000000000
Binary files a/_images/simple_plot1.png and /dev/null differ
diff --git a/_images/simple_rgb.png b/_images/simple_rgb.png
deleted file mode 100644
index 1fc91553e27..00000000000
Binary files a/_images/simple_rgb.png and /dev/null differ
diff --git a/_images/skewt.png b/_images/skewt.png
deleted file mode 100644
index b7d73961ee2..00000000000
Binary files a/_images/skewt.png and /dev/null differ
diff --git a/_images/skewt1.png b/_images/skewt1.png
deleted file mode 100644
index b7d73961ee2..00000000000
Binary files a/_images/skewt1.png and /dev/null differ
diff --git a/_images/slider_demo.png b/_images/slider_demo.png
deleted file mode 100644
index 3627ef76250..00000000000
Binary files a/_images/slider_demo.png and /dev/null differ
diff --git a/_images/span_regions.png b/_images/span_regions.png
deleted file mode 100644
index b976a23de5b..00000000000
Binary files a/_images/span_regions.png and /dev/null differ
diff --git a/_images/specgram_demo.png b/_images/specgram_demo.png
deleted file mode 100644
index 27fc09a5c63..00000000000
Binary files a/_images/specgram_demo.png and /dev/null differ
diff --git a/_images/specgram_demo1.png b/_images/specgram_demo1.png
deleted file mode 100644
index 27fc09a5c63..00000000000
Binary files a/_images/specgram_demo1.png and /dev/null differ
diff --git a/_images/specgram_demo2.png b/_images/specgram_demo2.png
deleted file mode 100644
index 27fc09a5c63..00000000000
Binary files a/_images/specgram_demo2.png and /dev/null differ
diff --git a/_images/spectrum_demo.png b/_images/spectrum_demo.png
deleted file mode 100644
index 75a8b7b9f93..00000000000
Binary files a/_images/spectrum_demo.png and /dev/null differ
diff --git a/_images/spectrum_demo1.png b/_images/spectrum_demo1.png
deleted file mode 100644
index 75a8b7b9f93..00000000000
Binary files a/_images/spectrum_demo1.png and /dev/null differ
diff --git a/_images/spectrum_demo2.png b/_images/spectrum_demo2.png
deleted file mode 100644
index 75a8b7b9f93..00000000000
Binary files a/_images/spectrum_demo2.png and /dev/null differ
diff --git a/_images/spine_placement_demo_00.png b/_images/spine_placement_demo_00.png
deleted file mode 100644
index d166178b498..00000000000
Binary files a/_images/spine_placement_demo_00.png and /dev/null differ
diff --git a/_images/spine_placement_demo_01.png b/_images/spine_placement_demo_01.png
deleted file mode 100644
index 76a97bd3c6e..00000000000
Binary files a/_images/spine_placement_demo_01.png and /dev/null differ
diff --git a/_images/spines_demo.png b/_images/spines_demo.png
deleted file mode 100644
index f8911f6e3ef..00000000000
Binary files a/_images/spines_demo.png and /dev/null differ
diff --git a/_images/spines_demo_bounds.png b/_images/spines_demo_bounds.png
deleted file mode 100644
index 5d351d04294..00000000000
Binary files a/_images/spines_demo_bounds.png and /dev/null differ
diff --git a/_images/spines_demo_dropped.png b/_images/spines_demo_dropped.png
deleted file mode 100644
index e69e268f2df..00000000000
Binary files a/_images/spines_demo_dropped.png and /dev/null differ
diff --git a/_images/spy_demos.png b/_images/spy_demos.png
deleted file mode 100644
index 631a809602d..00000000000
Binary files a/_images/spy_demos.png and /dev/null differ
diff --git a/_images/stackplot_demo2.png b/_images/stackplot_demo2.png
deleted file mode 100644
index b40f67cf0d6..00000000000
Binary files a/_images/stackplot_demo2.png and /dev/null differ
diff --git a/_images/stackplot_demo21.png b/_images/stackplot_demo21.png
deleted file mode 100644
index b40f67cf0d6..00000000000
Binary files a/_images/stackplot_demo21.png and /dev/null differ
diff --git a/_images/stackplot_demo_00_00.png b/_images/stackplot_demo_00_00.png
deleted file mode 100644
index ea8bf13e15e..00000000000
Binary files a/_images/stackplot_demo_00_00.png and /dev/null differ
diff --git a/_images/stackplot_demo_01_00.png b/_images/stackplot_demo_01_00.png
deleted file mode 100644
index 383af71ca59..00000000000
Binary files a/_images/stackplot_demo_01_00.png and /dev/null differ
diff --git a/_images/stem_plot.png b/_images/stem_plot.png
deleted file mode 100644
index 96e9be721b6..00000000000
Binary files a/_images/stem_plot.png and /dev/null differ
diff --git a/_images/stem_plot1.png b/_images/stem_plot1.png
deleted file mode 100644
index 96e9be721b6..00000000000
Binary files a/_images/stem_plot1.png and /dev/null differ
diff --git a/_images/stem_plot2.png b/_images/stem_plot2.png
deleted file mode 100644
index 96e9be721b6..00000000000
Binary files a/_images/stem_plot2.png and /dev/null differ
diff --git a/_images/step_demo.png b/_images/step_demo.png
deleted file mode 100644
index 8e7481d117d..00000000000
Binary files a/_images/step_demo.png and /dev/null differ
diff --git a/_images/stix_fonts_demo_01_00.png b/_images/stix_fonts_demo_01_00.png
deleted file mode 100644
index 8f57818c5e9..00000000000
Binary files a/_images/stix_fonts_demo_01_00.png and /dev/null differ
diff --git a/_images/streamplot_demo_features_00.png b/_images/streamplot_demo_features_00.png
deleted file mode 100644
index 8e6b5360e3d..00000000000
Binary files a/_images/streamplot_demo_features_00.png and /dev/null differ
diff --git a/_images/streamplot_demo_features_001.png b/_images/streamplot_demo_features_001.png
deleted file mode 100644
index 8e6b5360e3d..00000000000
Binary files a/_images/streamplot_demo_features_001.png and /dev/null differ
diff --git a/_images/streamplot_demo_features_002.png b/_images/streamplot_demo_features_002.png
deleted file mode 100644
index 8e6b5360e3d..00000000000
Binary files a/_images/streamplot_demo_features_002.png and /dev/null differ
diff --git a/_images/streamplot_demo_features_01.png b/_images/streamplot_demo_features_01.png
deleted file mode 100644
index d502def9640..00000000000
Binary files a/_images/streamplot_demo_features_01.png and /dev/null differ
diff --git a/_images/streamplot_demo_features_011.png b/_images/streamplot_demo_features_011.png
deleted file mode 100644
index d502def9640..00000000000
Binary files a/_images/streamplot_demo_features_011.png and /dev/null differ
diff --git a/_images/streamplot_demo_features_012.png b/_images/streamplot_demo_features_012.png
deleted file mode 100644
index d502def9640..00000000000
Binary files a/_images/streamplot_demo_features_012.png and /dev/null differ
diff --git a/_images/streamplot_demo_masking.png b/_images/streamplot_demo_masking.png
deleted file mode 100644
index 76d5f3e8ef8..00000000000
Binary files a/_images/streamplot_demo_masking.png and /dev/null differ
diff --git a/_images/streamplot_demo_start_points.png b/_images/streamplot_demo_start_points.png
deleted file mode 100644
index e413502a76e..00000000000
Binary files a/_images/streamplot_demo_start_points.png and /dev/null differ
diff --git a/_images/style_sheets_reference_00.png b/_images/style_sheets_reference_00.png
deleted file mode 100644
index 8ae967568c9..00000000000
Binary files a/_images/style_sheets_reference_00.png and /dev/null differ
diff --git a/_images/style_sheets_reference_01.png b/_images/style_sheets_reference_01.png
deleted file mode 100644
index 3081c89cff8..00000000000
Binary files a/_images/style_sheets_reference_01.png and /dev/null differ
diff --git a/_images/style_sheets_reference_02.png b/_images/style_sheets_reference_02.png
deleted file mode 100644
index 1110399ccb8..00000000000
Binary files a/_images/style_sheets_reference_02.png and /dev/null differ
diff --git a/_images/style_sheets_reference_03.png b/_images/style_sheets_reference_03.png
deleted file mode 100644
index 4bfaea5dfff..00000000000
Binary files a/_images/style_sheets_reference_03.png and /dev/null differ
diff --git a/_images/style_sheets_reference_04.png b/_images/style_sheets_reference_04.png
deleted file mode 100644
index 23a535895e6..00000000000
Binary files a/_images/style_sheets_reference_04.png and /dev/null differ
diff --git a/_images/style_sheets_reference_05.png b/_images/style_sheets_reference_05.png
deleted file mode 100644
index 01bfedc0209..00000000000
Binary files a/_images/style_sheets_reference_05.png and /dev/null differ
diff --git a/_images/style_sheets_reference_06.png b/_images/style_sheets_reference_06.png
deleted file mode 100644
index b00545674e9..00000000000
Binary files a/_images/style_sheets_reference_06.png and /dev/null differ
diff --git a/_images/style_sheets_reference_07.png b/_images/style_sheets_reference_07.png
deleted file mode 100644
index 7fd34b8a499..00000000000
Binary files a/_images/style_sheets_reference_07.png and /dev/null differ
diff --git a/_images/style_sheets_reference_08.png b/_images/style_sheets_reference_08.png
deleted file mode 100644
index 04301a4db74..00000000000
Binary files a/_images/style_sheets_reference_08.png and /dev/null differ
diff --git a/_images/style_sheets_reference_09.png b/_images/style_sheets_reference_09.png
deleted file mode 100644
index 15337888dc8..00000000000
Binary files a/_images/style_sheets_reference_09.png and /dev/null differ
diff --git a/_images/style_sheets_reference_10.png b/_images/style_sheets_reference_10.png
deleted file mode 100644
index 802d0d54219..00000000000
Binary files a/_images/style_sheets_reference_10.png and /dev/null differ
diff --git a/_images/style_sheets_reference_11.png b/_images/style_sheets_reference_11.png
deleted file mode 100644
index 4f78a40c4b2..00000000000
Binary files a/_images/style_sheets_reference_11.png and /dev/null differ
diff --git a/_images/style_sheets_reference_12.png b/_images/style_sheets_reference_12.png
deleted file mode 100644
index 06eefb35733..00000000000
Binary files a/_images/style_sheets_reference_12.png and /dev/null differ
diff --git a/_images/style_sheets_reference_13.png b/_images/style_sheets_reference_13.png
deleted file mode 100644
index 9a805f19e1b..00000000000
Binary files a/_images/style_sheets_reference_13.png and /dev/null differ
diff --git a/_images/style_sheets_reference_14.png b/_images/style_sheets_reference_14.png
deleted file mode 100644
index 4b81b5c8b71..00000000000
Binary files a/_images/style_sheets_reference_14.png and /dev/null differ
diff --git a/_images/style_sheets_reference_15.png b/_images/style_sheets_reference_15.png
deleted file mode 100644
index e17e2018d41..00000000000
Binary files a/_images/style_sheets_reference_15.png and /dev/null differ
diff --git a/_images/style_sheets_reference_16.png b/_images/style_sheets_reference_16.png
deleted file mode 100644
index 983f79236c6..00000000000
Binary files a/_images/style_sheets_reference_16.png and /dev/null differ
diff --git a/_images/style_sheets_reference_17.png b/_images/style_sheets_reference_17.png
deleted file mode 100644
index b6e807a7eca..00000000000
Binary files a/_images/style_sheets_reference_17.png and /dev/null differ
diff --git a/_images/style_sheets_reference_18.png b/_images/style_sheets_reference_18.png
deleted file mode 100644
index b49c63a2f88..00000000000
Binary files a/_images/style_sheets_reference_18.png and /dev/null differ
diff --git a/_images/style_sheets_reference_19.png b/_images/style_sheets_reference_19.png
deleted file mode 100644
index 063b53944ed..00000000000
Binary files a/_images/style_sheets_reference_19.png and /dev/null differ
diff --git a/_images/style_sheets_reference_20.png b/_images/style_sheets_reference_20.png
deleted file mode 100644
index d8c7bccaa5b..00000000000
Binary files a/_images/style_sheets_reference_20.png and /dev/null differ
diff --git a/_images/style_sheets_reference_21.png b/_images/style_sheets_reference_21.png
deleted file mode 100644
index 6a560e51a3b..00000000000
Binary files a/_images/style_sheets_reference_21.png and /dev/null differ
diff --git a/_images/style_sheets_reference_22.png b/_images/style_sheets_reference_22.png
deleted file mode 100644
index fb8d26249d5..00000000000
Binary files a/_images/style_sheets_reference_22.png and /dev/null differ
diff --git a/_images/style_sheets_reference_23.png b/_images/style_sheets_reference_23.png
deleted file mode 100644
index eca5ac9457e..00000000000
Binary files a/_images/style_sheets_reference_23.png and /dev/null differ
diff --git a/_images/subplot3d_demo.png b/_images/subplot3d_demo.png
deleted file mode 100644
index b8430a49fda..00000000000
Binary files a/_images/subplot3d_demo.png and /dev/null differ
diff --git a/_images/subplot3d_demo1.png b/_images/subplot3d_demo1.png
deleted file mode 100644
index b8430a49fda..00000000000
Binary files a/_images/subplot3d_demo1.png and /dev/null differ
diff --git a/_images/subplot_demo.png b/_images/subplot_demo.png
deleted file mode 100644
index 3618aa86464..00000000000
Binary files a/_images/subplot_demo.png and /dev/null differ
diff --git a/_images/subplot_demo1.png b/_images/subplot_demo1.png
deleted file mode 100644
index 3618aa86464..00000000000
Binary files a/_images/subplot_demo1.png and /dev/null differ
diff --git a/_images/subplot_demo2.png b/_images/subplot_demo2.png
deleted file mode 100644
index f1de42d73f5..00000000000
Binary files a/_images/subplot_demo2.png and /dev/null differ
diff --git a/_images/subplot_demo3.png b/_images/subplot_demo3.png
deleted file mode 100644
index 3618aa86464..00000000000
Binary files a/_images/subplot_demo3.png and /dev/null differ
diff --git a/_images/subplot_toolbar_00.png b/_images/subplot_toolbar_00.png
deleted file mode 100644
index b1b2761e586..00000000000
Binary files a/_images/subplot_toolbar_00.png and /dev/null differ
diff --git a/_images/subplot_toolbar_01.png b/_images/subplot_toolbar_01.png
deleted file mode 100644
index 8799637cd3d..00000000000
Binary files a/_images/subplot_toolbar_01.png and /dev/null differ
diff --git a/_images/subplots_adjust.png b/_images/subplots_adjust.png
deleted file mode 100644
index 822bd8eaf1c..00000000000
Binary files a/_images/subplots_adjust.png and /dev/null differ
diff --git a/_images/subplots_demo_00.png b/_images/subplots_demo_00.png
deleted file mode 100644
index c23cd2f1e38..00000000000
Binary files a/_images/subplots_demo_00.png and /dev/null differ
diff --git a/_images/subplots_demo_01.png b/_images/subplots_demo_01.png
deleted file mode 100644
index e9068564c3f..00000000000
Binary files a/_images/subplots_demo_01.png and /dev/null differ
diff --git a/_images/subplots_demo_02.png b/_images/subplots_demo_02.png
deleted file mode 100644
index c8fa6b32f21..00000000000
Binary files a/_images/subplots_demo_02.png and /dev/null differ
diff --git a/_images/subplots_demo_03.png b/_images/subplots_demo_03.png
deleted file mode 100644
index 9166643cc8f..00000000000
Binary files a/_images/subplots_demo_03.png and /dev/null differ
diff --git a/_images/subplots_demo_04.png b/_images/subplots_demo_04.png
deleted file mode 100644
index 7e7add5aa53..00000000000
Binary files a/_images/subplots_demo_04.png and /dev/null differ
diff --git a/_images/subplots_demo_05.png b/_images/subplots_demo_05.png
deleted file mode 100644
index bab22e8439b..00000000000
Binary files a/_images/subplots_demo_05.png and /dev/null differ
diff --git a/_images/subplots_demo_06.png b/_images/subplots_demo_06.png
deleted file mode 100644
index 37301eca65d..00000000000
Binary files a/_images/subplots_demo_06.png and /dev/null differ
diff --git a/_images/surface3d_demo.png b/_images/surface3d_demo.png
deleted file mode 100644
index 086d98f337c..00000000000
Binary files a/_images/surface3d_demo.png and /dev/null differ
diff --git a/_images/surface3d_demo1.png b/_images/surface3d_demo1.png
deleted file mode 100644
index 086d98f337c..00000000000
Binary files a/_images/surface3d_demo1.png and /dev/null differ
diff --git a/_images/surface3d_demo2.png b/_images/surface3d_demo2.png
deleted file mode 100644
index b2d9144da2d..00000000000
Binary files a/_images/surface3d_demo2.png and /dev/null differ
diff --git a/_images/surface3d_demo21.png b/_images/surface3d_demo21.png
deleted file mode 100644
index b2d9144da2d..00000000000
Binary files a/_images/surface3d_demo21.png and /dev/null differ
diff --git a/_images/surface3d_demo3.png b/_images/surface3d_demo3.png
deleted file mode 100644
index 979243d14ab..00000000000
Binary files a/_images/surface3d_demo3.png and /dev/null differ
diff --git a/_images/surface3d_demo31.png b/_images/surface3d_demo31.png
deleted file mode 100644
index 979243d14ab..00000000000
Binary files a/_images/surface3d_demo31.png and /dev/null differ
diff --git a/_images/surface3d_demo4.png b/_images/surface3d_demo4.png
deleted file mode 100644
index 086d98f337c..00000000000
Binary files a/_images/surface3d_demo4.png and /dev/null differ
diff --git a/_images/surface3d_radial_demo.png b/_images/surface3d_radial_demo.png
deleted file mode 100644
index 183ce8c95d5..00000000000
Binary files a/_images/surface3d_radial_demo.png and /dev/null differ
diff --git a/_images/svg_filter_line.png b/_images/svg_filter_line.png
deleted file mode 100644
index 499e5ce0fbc..00000000000
Binary files a/_images/svg_filter_line.png and /dev/null differ
diff --git a/_images/svg_filter_pie.png b/_images/svg_filter_pie.png
deleted file mode 100644
index 94abd978a33..00000000000
Binary files a/_images/svg_filter_pie.png and /dev/null differ
diff --git a/_images/symlog_demo.png b/_images/symlog_demo.png
deleted file mode 100644
index 34cf1b74142..00000000000
Binary files a/_images/symlog_demo.png and /dev/null differ
diff --git a/_images/system_monitor.png b/_images/system_monitor.png
deleted file mode 100644
index 777d50c05cb..00000000000
Binary files a/_images/system_monitor.png and /dev/null differ
diff --git a/_images/table_demo.png b/_images/table_demo.png
deleted file mode 100644
index feb87b5f502..00000000000
Binary files a/_images/table_demo.png and /dev/null differ
diff --git a/_images/table_demo1.png b/_images/table_demo1.png
deleted file mode 100644
index feb87b5f502..00000000000
Binary files a/_images/table_demo1.png and /dev/null differ
diff --git a/_images/tex_demo.png b/_images/tex_demo.png
deleted file mode 100644
index 96258ffb906..00000000000
Binary files a/_images/tex_demo.png and /dev/null differ
diff --git a/_images/tex_demo1.png b/_images/tex_demo1.png
deleted file mode 100644
index 394cf654623..00000000000
Binary files a/_images/tex_demo1.png and /dev/null differ
diff --git a/_images/tex_unicode_demo.png b/_images/tex_unicode_demo.png
deleted file mode 100644
index ef573d802e5..00000000000
Binary files a/_images/tex_unicode_demo.png and /dev/null differ
diff --git a/_images/tex_unicode_demo1.png b/_images/tex_unicode_demo1.png
deleted file mode 100644
index ef573d802e5..00000000000
Binary files a/_images/tex_unicode_demo1.png and /dev/null differ
diff --git a/_images/text3d_demo.png b/_images/text3d_demo.png
deleted file mode 100644
index 003e1c09cfc..00000000000
Binary files a/_images/text3d_demo.png and /dev/null differ
diff --git a/_images/text3d_demo1.png b/_images/text3d_demo1.png
deleted file mode 100644
index 003e1c09cfc..00000000000
Binary files a/_images/text3d_demo1.png and /dev/null differ
diff --git a/_images/text_commands.png b/_images/text_commands.png
deleted file mode 100644
index bc22160e685..00000000000
Binary files a/_images/text_commands.png and /dev/null differ
diff --git a/_images/text_demo_fontdict.png b/_images/text_demo_fontdict.png
deleted file mode 100644
index 0936b9485b7..00000000000
Binary files a/_images/text_demo_fontdict.png and /dev/null differ
diff --git a/_images/text_handles.png b/_images/text_handles.png
deleted file mode 100644
index b6e49f834b0..00000000000
Binary files a/_images/text_handles.png and /dev/null differ
diff --git a/_images/text_layout.png b/_images/text_layout.png
deleted file mode 100644
index d6d10e52323..00000000000
Binary files a/_images/text_layout.png and /dev/null differ
diff --git a/_images/text_rotation.png b/_images/text_rotation.png
deleted file mode 100644
index 26834a119f0..00000000000
Binary files a/_images/text_rotation.png and /dev/null differ
diff --git a/_images/text_rotation_relative_to_line.png b/_images/text_rotation_relative_to_line.png
deleted file mode 100644
index a33946b1278..00000000000
Binary files a/_images/text_rotation_relative_to_line.png and /dev/null differ
diff --git a/_images/tick-formatters.png b/_images/tick-formatters.png
deleted file mode 100644
index e3cea4f95bb..00000000000
Binary files a/_images/tick-formatters.png and /dev/null differ
diff --git a/_images/tick-locators.png b/_images/tick-locators.png
deleted file mode 100644
index 85918a380c8..00000000000
Binary files a/_images/tick-locators.png and /dev/null differ
diff --git a/_images/tick_labels_from_values.png b/_images/tick_labels_from_values.png
deleted file mode 100644
index aadce0d198f..00000000000
Binary files a/_images/tick_labels_from_values.png and /dev/null differ
diff --git a/_images/ticklabels_demo_rotation.png b/_images/ticklabels_demo_rotation.png
deleted file mode 100644
index 8bcf202f88f..00000000000
Binary files a/_images/ticklabels_demo_rotation.png and /dev/null differ
diff --git a/_images/tight_bbox_test.png b/_images/tight_bbox_test.png
deleted file mode 100644
index b1b2e5b4740..00000000000
Binary files a/_images/tight_bbox_test.png and /dev/null differ
diff --git a/_images/tight_layout_guide-1.png b/_images/tight_layout_guide-1.png
deleted file mode 100644
index 2f7029474dc..00000000000
Binary files a/_images/tight_layout_guide-1.png and /dev/null differ
diff --git a/_images/tight_layout_guide-10.png b/_images/tight_layout_guide-10.png
deleted file mode 100644
index ea3a90633f0..00000000000
Binary files a/_images/tight_layout_guide-10.png and /dev/null differ
diff --git a/_images/tight_layout_guide-11.png b/_images/tight_layout_guide-11.png
deleted file mode 100644
index 7186e59216a..00000000000
Binary files a/_images/tight_layout_guide-11.png and /dev/null differ
diff --git a/_images/tight_layout_guide-12.png b/_images/tight_layout_guide-12.png
deleted file mode 100644
index 7a12aa51fd2..00000000000
Binary files a/_images/tight_layout_guide-12.png and /dev/null differ
diff --git a/_images/tight_layout_guide-13.png b/_images/tight_layout_guide-13.png
deleted file mode 100644
index 1dd762b0c96..00000000000
Binary files a/_images/tight_layout_guide-13.png and /dev/null differ
diff --git a/_images/tight_layout_guide-14.png b/_images/tight_layout_guide-14.png
deleted file mode 100644
index def846642d9..00000000000
Binary files a/_images/tight_layout_guide-14.png and /dev/null differ
diff --git a/_images/tight_layout_guide-15.png b/_images/tight_layout_guide-15.png
deleted file mode 100644
index 9b5041e5a80..00000000000
Binary files a/_images/tight_layout_guide-15.png and /dev/null differ
diff --git a/_images/tight_layout_guide-2.png b/_images/tight_layout_guide-2.png
deleted file mode 100644
index a4ffa74293f..00000000000
Binary files a/_images/tight_layout_guide-2.png and /dev/null differ
diff --git a/_images/tight_layout_guide-3.png b/_images/tight_layout_guide-3.png
deleted file mode 100644
index 3df63d7f680..00000000000
Binary files a/_images/tight_layout_guide-3.png and /dev/null differ
diff --git a/_images/tight_layout_guide-4.png b/_images/tight_layout_guide-4.png
deleted file mode 100644
index eabb6e07593..00000000000
Binary files a/_images/tight_layout_guide-4.png and /dev/null differ
diff --git a/_images/tight_layout_guide-5.png b/_images/tight_layout_guide-5.png
deleted file mode 100644
index 3b338623eb9..00000000000
Binary files a/_images/tight_layout_guide-5.png and /dev/null differ
diff --git a/_images/tight_layout_guide-6.png b/_images/tight_layout_guide-6.png
deleted file mode 100644
index 821e1937aec..00000000000
Binary files a/_images/tight_layout_guide-6.png and /dev/null differ
diff --git a/_images/tight_layout_guide-7.png b/_images/tight_layout_guide-7.png
deleted file mode 100644
index 92ee03edd8e..00000000000
Binary files a/_images/tight_layout_guide-7.png and /dev/null differ
diff --git a/_images/tight_layout_guide-8.png b/_images/tight_layout_guide-8.png
deleted file mode 100644
index 72568c6a9f0..00000000000
Binary files a/_images/tight_layout_guide-8.png and /dev/null differ
diff --git a/_images/tight_layout_guide-9.png b/_images/tight_layout_guide-9.png
deleted file mode 100644
index 4edb1d8fee1..00000000000
Binary files a/_images/tight_layout_guide-9.png and /dev/null differ
diff --git a/_images/titles_demo.png b/_images/titles_demo.png
deleted file mode 100644
index 5d8febb9e3b..00000000000
Binary files a/_images/titles_demo.png and /dev/null differ
diff --git a/_images/toggle_images.png b/_images/toggle_images.png
deleted file mode 100644
index 8d571d5b37f..00000000000
Binary files a/_images/toggle_images.png and /dev/null differ
diff --git a/_images/topographic_hillshading.png b/_images/topographic_hillshading.png
deleted file mode 100644
index 6f608b94292..00000000000
Binary files a/_images/topographic_hillshading.png and /dev/null differ
diff --git a/_images/transforms_tutorial-1.png b/_images/transforms_tutorial-1.png
deleted file mode 100644
index 6b8963e7afa..00000000000
Binary files a/_images/transforms_tutorial-1.png and /dev/null differ
diff --git a/_images/transforms_tutorial-2.png b/_images/transforms_tutorial-2.png
deleted file mode 100644
index 2277bbb54be..00000000000
Binary files a/_images/transforms_tutorial-2.png and /dev/null differ
diff --git a/_images/transforms_tutorial-3.png b/_images/transforms_tutorial-3.png
deleted file mode 100644
index 0066a89eb67..00000000000
Binary files a/_images/transforms_tutorial-3.png and /dev/null differ
diff --git a/_images/transforms_tutorial-4.png b/_images/transforms_tutorial-4.png
deleted file mode 100644
index f52ec0e20f5..00000000000
Binary files a/_images/transforms_tutorial-4.png and /dev/null differ
diff --git a/_images/transforms_tutorial-5.png b/_images/transforms_tutorial-5.png
deleted file mode 100644
index a334b9e4b98..00000000000
Binary files a/_images/transforms_tutorial-5.png and /dev/null differ
diff --git a/_images/transoffset.png b/_images/transoffset.png
deleted file mode 100644
index 9d9cb40def3..00000000000
Binary files a/_images/transoffset.png and /dev/null differ
diff --git a/_images/tricontour3d_demo.png b/_images/tricontour3d_demo.png
deleted file mode 100644
index 52f456ee0e2..00000000000
Binary files a/_images/tricontour3d_demo.png and /dev/null differ
diff --git a/_images/tricontour3d_demo1.png b/_images/tricontour3d_demo1.png
deleted file mode 100644
index 52f456ee0e2..00000000000
Binary files a/_images/tricontour3d_demo1.png and /dev/null differ
diff --git a/_images/tricontour_demo_00.png b/_images/tricontour_demo_00.png
deleted file mode 100644
index 985502f3043..00000000000
Binary files a/_images/tricontour_demo_00.png and /dev/null differ
diff --git a/_images/tricontour_demo_001.png b/_images/tricontour_demo_001.png
deleted file mode 100644
index 985502f3043..00000000000
Binary files a/_images/tricontour_demo_001.png and /dev/null differ
diff --git a/_images/tricontour_demo_002.png b/_images/tricontour_demo_002.png
deleted file mode 100644
index 985502f3043..00000000000
Binary files a/_images/tricontour_demo_002.png and /dev/null differ
diff --git a/_images/tricontour_demo_01.png b/_images/tricontour_demo_01.png
deleted file mode 100644
index 2e945a5646f..00000000000
Binary files a/_images/tricontour_demo_01.png and /dev/null differ
diff --git a/_images/tricontour_demo_011.png b/_images/tricontour_demo_011.png
deleted file mode 100644
index 2e945a5646f..00000000000
Binary files a/_images/tricontour_demo_011.png and /dev/null differ
diff --git a/_images/tricontour_demo_012.png b/_images/tricontour_demo_012.png
deleted file mode 100644
index 2e945a5646f..00000000000
Binary files a/_images/tricontour_demo_012.png and /dev/null differ
diff --git a/_images/tricontour_smooth_delaunay.png b/_images/tricontour_smooth_delaunay.png
deleted file mode 100644
index a2466c273f1..00000000000
Binary files a/_images/tricontour_smooth_delaunay.png and /dev/null differ
diff --git a/_images/tricontour_smooth_delaunay1.png b/_images/tricontour_smooth_delaunay1.png
deleted file mode 100644
index a2466c273f1..00000000000
Binary files a/_images/tricontour_smooth_delaunay1.png and /dev/null differ
diff --git a/_images/tricontour_smooth_user.png b/_images/tricontour_smooth_user.png
deleted file mode 100644
index 108936cce80..00000000000
Binary files a/_images/tricontour_smooth_user.png and /dev/null differ
diff --git a/_images/tricontour_smooth_user1.png b/_images/tricontour_smooth_user1.png
deleted file mode 100644
index 108936cce80..00000000000
Binary files a/_images/tricontour_smooth_user1.png and /dev/null differ
diff --git a/_images/tricontour_smooth_user2.png b/_images/tricontour_smooth_user2.png
deleted file mode 100644
index 108936cce80..00000000000
Binary files a/_images/tricontour_smooth_user2.png and /dev/null differ
diff --git a/_images/tricontour_vs_griddata.png b/_images/tricontour_vs_griddata.png
deleted file mode 100644
index a4ad36a69eb..00000000000
Binary files a/_images/tricontour_vs_griddata.png and /dev/null differ
diff --git a/_images/tricontourf3d_demo.png b/_images/tricontourf3d_demo.png
deleted file mode 100644
index 0ce5378982d..00000000000
Binary files a/_images/tricontourf3d_demo.png and /dev/null differ
diff --git a/_images/trigradient_demo.png b/_images/trigradient_demo.png
deleted file mode 100644
index 95ac973bdde..00000000000
Binary files a/_images/trigradient_demo.png and /dev/null differ
diff --git a/_images/trigradient_demo1.png b/_images/trigradient_demo1.png
deleted file mode 100644
index 95ac973bdde..00000000000
Binary files a/_images/trigradient_demo1.png and /dev/null differ
diff --git a/_images/triinterp_demo.png b/_images/triinterp_demo.png
deleted file mode 100644
index 6337412fe13..00000000000
Binary files a/_images/triinterp_demo.png and /dev/null differ
diff --git a/_images/tripcolor_demo_00.png b/_images/tripcolor_demo_00.png
deleted file mode 100644
index 6d065220058..00000000000
Binary files a/_images/tripcolor_demo_00.png and /dev/null differ
diff --git a/_images/tripcolor_demo_001.png b/_images/tripcolor_demo_001.png
deleted file mode 100644
index 6d065220058..00000000000
Binary files a/_images/tripcolor_demo_001.png and /dev/null differ
diff --git a/_images/tripcolor_demo_002.png b/_images/tripcolor_demo_002.png
deleted file mode 100644
index 6d065220058..00000000000
Binary files a/_images/tripcolor_demo_002.png and /dev/null differ
diff --git a/_images/tripcolor_demo_003.png b/_images/tripcolor_demo_003.png
deleted file mode 100644
index 6d065220058..00000000000
Binary files a/_images/tripcolor_demo_003.png and /dev/null differ
diff --git a/_images/tripcolor_demo_01.png b/_images/tripcolor_demo_01.png
deleted file mode 100644
index b9ea23f9441..00000000000
Binary files a/_images/tripcolor_demo_01.png and /dev/null differ
diff --git a/_images/tripcolor_demo_011.png b/_images/tripcolor_demo_011.png
deleted file mode 100644
index b9ea23f9441..00000000000
Binary files a/_images/tripcolor_demo_011.png and /dev/null differ
diff --git a/_images/tripcolor_demo_012.png b/_images/tripcolor_demo_012.png
deleted file mode 100644
index b9ea23f9441..00000000000
Binary files a/_images/tripcolor_demo_012.png and /dev/null differ
diff --git a/_images/tripcolor_demo_013.png b/_images/tripcolor_demo_013.png
deleted file mode 100644
index b9ea23f9441..00000000000
Binary files a/_images/tripcolor_demo_013.png and /dev/null differ
diff --git a/_images/tripcolor_demo_02.png b/_images/tripcolor_demo_02.png
deleted file mode 100644
index 13e5e5d8d9d..00000000000
Binary files a/_images/tripcolor_demo_02.png and /dev/null differ
diff --git a/_images/tripcolor_demo_021.png b/_images/tripcolor_demo_021.png
deleted file mode 100644
index 13e5e5d8d9d..00000000000
Binary files a/_images/tripcolor_demo_021.png and /dev/null differ
diff --git a/_images/tripcolor_demo_022.png b/_images/tripcolor_demo_022.png
deleted file mode 100644
index 13e5e5d8d9d..00000000000
Binary files a/_images/tripcolor_demo_022.png and /dev/null differ
diff --git a/_images/tripcolor_demo_023.png b/_images/tripcolor_demo_023.png
deleted file mode 100644
index 13e5e5d8d9d..00000000000
Binary files a/_images/tripcolor_demo_023.png and /dev/null differ
diff --git a/_images/triplot_demo_00.png b/_images/triplot_demo_00.png
deleted file mode 100644
index 41da287e9a5..00000000000
Binary files a/_images/triplot_demo_00.png and /dev/null differ
diff --git a/_images/triplot_demo_001.png b/_images/triplot_demo_001.png
deleted file mode 100644
index 41da287e9a5..00000000000
Binary files a/_images/triplot_demo_001.png and /dev/null differ
diff --git a/_images/triplot_demo_002.png b/_images/triplot_demo_002.png
deleted file mode 100644
index 41da287e9a5..00000000000
Binary files a/_images/triplot_demo_002.png and /dev/null differ
diff --git a/_images/triplot_demo_003.png b/_images/triplot_demo_003.png
deleted file mode 100644
index 41da287e9a5..00000000000
Binary files a/_images/triplot_demo_003.png and /dev/null differ
diff --git a/_images/triplot_demo_01.png b/_images/triplot_demo_01.png
deleted file mode 100644
index 26837648962..00000000000
Binary files a/_images/triplot_demo_01.png and /dev/null differ
diff --git a/_images/triplot_demo_011.png b/_images/triplot_demo_011.png
deleted file mode 100644
index 26837648962..00000000000
Binary files a/_images/triplot_demo_011.png and /dev/null differ
diff --git a/_images/triplot_demo_012.png b/_images/triplot_demo_012.png
deleted file mode 100644
index 26837648962..00000000000
Binary files a/_images/triplot_demo_012.png and /dev/null differ
diff --git a/_images/triplot_demo_013.png b/_images/triplot_demo_013.png
deleted file mode 100644
index 26837648962..00000000000
Binary files a/_images/triplot_demo_013.png and /dev/null differ
diff --git a/_images/trisurf3d_demo.png b/_images/trisurf3d_demo.png
deleted file mode 100644
index de2902d8226..00000000000
Binary files a/_images/trisurf3d_demo.png and /dev/null differ
diff --git a/_images/trisurf3d_demo1.png b/_images/trisurf3d_demo1.png
deleted file mode 100644
index de2902d8226..00000000000
Binary files a/_images/trisurf3d_demo1.png and /dev/null differ
diff --git a/_images/trisurf3d_demo2.png b/_images/trisurf3d_demo2.png
deleted file mode 100644
index 28a7dac87e8..00000000000
Binary files a/_images/trisurf3d_demo2.png and /dev/null differ
diff --git a/_images/trisurf3d_demo21.png b/_images/trisurf3d_demo21.png
deleted file mode 100644
index 28a7dac87e8..00000000000
Binary files a/_images/trisurf3d_demo21.png and /dev/null differ
diff --git a/_images/trisurf3d_demo3.png b/_images/trisurf3d_demo3.png
deleted file mode 100644
index de2902d8226..00000000000
Binary files a/_images/trisurf3d_demo3.png and /dev/null differ
diff --git a/_images/two_scales.png b/_images/two_scales.png
deleted file mode 100644
index 3850fc3b8bb..00000000000
Binary files a/_images/two_scales.png and /dev/null differ
diff --git a/_images/unicode_demo.png b/_images/unicode_demo.png
deleted file mode 100644
index cbfba78ca70..00000000000
Binary files a/_images/unicode_demo.png and /dev/null differ
diff --git a/_images/unicode_minus.png b/_images/unicode_minus.png
deleted file mode 100644
index deb8dda00cf..00000000000
Binary files a/_images/unicode_minus.png and /dev/null differ
diff --git a/_images/units_sample.png b/_images/units_sample.png
deleted file mode 100644
index 37c197b0b06..00000000000
Binary files a/_images/units_sample.png and /dev/null differ
diff --git a/_images/units_scatter.png b/_images/units_scatter.png
deleted file mode 100644
index 710abf90353..00000000000
Binary files a/_images/units_scatter.png and /dev/null differ
diff --git a/_images/usetex_baseline_test.png b/_images/usetex_baseline_test.png
deleted file mode 100644
index 422addd4d42..00000000000
Binary files a/_images/usetex_baseline_test.png and /dev/null differ
diff --git a/_images/usetex_demo.png b/_images/usetex_demo.png
deleted file mode 100644
index abb6a0903f6..00000000000
Binary files a/_images/usetex_demo.png and /dev/null differ
diff --git a/_images/usetex_fonteffects.png b/_images/usetex_fonteffects.png
deleted file mode 100644
index 5d3f77d29c1..00000000000
Binary files a/_images/usetex_fonteffects.png and /dev/null differ
diff --git a/_images/violinplot_demo.png b/_images/violinplot_demo.png
deleted file mode 100644
index 09c66271cfb..00000000000
Binary files a/_images/violinplot_demo.png and /dev/null differ
diff --git a/_images/vline_hline_demo.png b/_images/vline_hline_demo.png
deleted file mode 100644
index a8afaa3e6d5..00000000000
Binary files a/_images/vline_hline_demo.png and /dev/null differ
diff --git a/_images/vline_hline_demo1.png b/_images/vline_hline_demo1.png
deleted file mode 100644
index a8afaa3e6d5..00000000000
Binary files a/_images/vline_hline_demo1.png and /dev/null differ
diff --git a/_images/vline_hline_demo2.png b/_images/vline_hline_demo2.png
deleted file mode 100644
index a8afaa3e6d5..00000000000
Binary files a/_images/vline_hline_demo2.png and /dev/null differ
diff --git a/_images/watermark_image.png b/_images/watermark_image.png
deleted file mode 100644
index 779d8119acf..00000000000
Binary files a/_images/watermark_image.png and /dev/null differ
diff --git a/_images/watermark_text.png b/_images/watermark_text.png
deleted file mode 100644
index 83d1357a78c..00000000000
Binary files a/_images/watermark_text.png and /dev/null differ
diff --git a/_images/whats_new_1_subplot3d.png b/_images/whats_new_1_subplot3d.png
deleted file mode 100644
index d93723d008f..00000000000
Binary files a/_images/whats_new_1_subplot3d.png and /dev/null differ
diff --git a/_images/whats_new_98_4_fancy.png b/_images/whats_new_98_4_fancy.png
deleted file mode 100644
index db6fb74a9f5..00000000000
Binary files a/_images/whats_new_98_4_fancy.png and /dev/null differ
diff --git a/_images/whats_new_98_4_fill_between.png b/_images/whats_new_98_4_fill_between.png
deleted file mode 100644
index fa857eb44c2..00000000000
Binary files a/_images/whats_new_98_4_fill_between.png and /dev/null differ
diff --git a/_images/whats_new_98_4_legend.png b/_images/whats_new_98_4_legend.png
deleted file mode 100644
index 6ff43692865..00000000000
Binary files a/_images/whats_new_98_4_legend.png and /dev/null differ
diff --git a/_images/whats_new_99_axes_grid.png b/_images/whats_new_99_axes_grid.png
deleted file mode 100644
index daacf457393..00000000000
Binary files a/_images/whats_new_99_axes_grid.png and /dev/null differ
diff --git a/_images/whats_new_99_mplot3d.png b/_images/whats_new_99_mplot3d.png
deleted file mode 100644
index 242973dfd5e..00000000000
Binary files a/_images/whats_new_99_mplot3d.png and /dev/null differ
diff --git a/_images/whats_new_99_spines.png b/_images/whats_new_99_spines.png
deleted file mode 100644
index 76876c518fc..00000000000
Binary files a/_images/whats_new_99_spines.png and /dev/null differ
diff --git a/_images/wire3d_animation_demo.png b/_images/wire3d_animation_demo.png
deleted file mode 100644
index a449c813462..00000000000
Binary files a/_images/wire3d_animation_demo.png and /dev/null differ
diff --git a/_images/wire3d_demo.png b/_images/wire3d_demo.png
deleted file mode 100644
index 51ea9300a3f..00000000000
Binary files a/_images/wire3d_demo.png and /dev/null differ
diff --git a/_images/wire3d_demo1.png b/_images/wire3d_demo1.png
deleted file mode 100644
index 51ea9300a3f..00000000000
Binary files a/_images/wire3d_demo1.png and /dev/null differ
diff --git a/_images/wire3d_zero_stride.png b/_images/wire3d_zero_stride.png
deleted file mode 100644
index 6afce47a0b4..00000000000
Binary files a/_images/wire3d_zero_stride.png and /dev/null differ
diff --git a/_images/xcorr_demo.png b/_images/xcorr_demo.png
deleted file mode 100644
index 805d0685a57..00000000000
Binary files a/_images/xcorr_demo.png and /dev/null differ
diff --git a/_images/xcorr_demo1.png b/_images/xcorr_demo1.png
deleted file mode 100644
index 805d0685a57..00000000000
Binary files a/_images/xcorr_demo1.png and /dev/null differ
diff --git a/_images/xcorr_demo2.png b/_images/xcorr_demo2.png
deleted file mode 100644
index 805d0685a57..00000000000
Binary files a/_images/xcorr_demo2.png and /dev/null differ
diff --git a/_images/xkcd_00.png b/_images/xkcd_00.png
deleted file mode 100644
index aa8b56fc6df..00000000000
Binary files a/_images/xkcd_00.png and /dev/null differ
diff --git a/_images/xkcd_001.png b/_images/xkcd_001.png
deleted file mode 100644
index aa8b56fc6df..00000000000
Binary files a/_images/xkcd_001.png and /dev/null differ
diff --git a/_images/xkcd_002.png b/_images/xkcd_002.png
deleted file mode 100644
index aa8b56fc6df..00000000000
Binary files a/_images/xkcd_002.png and /dev/null differ
diff --git a/_images/xkcd_01.png b/_images/xkcd_01.png
deleted file mode 100644
index eb188f85b1d..00000000000
Binary files a/_images/xkcd_01.png and /dev/null differ
diff --git a/_images/xkcd_011.png b/_images/xkcd_011.png
deleted file mode 100644
index eb188f85b1d..00000000000
Binary files a/_images/xkcd_011.png and /dev/null differ
diff --git a/_images/xkcd_012.png b/_images/xkcd_012.png
deleted file mode 100644
index eb188f85b1d..00000000000
Binary files a/_images/xkcd_012.png and /dev/null differ
diff --git a/_images/zorder_demo_00.png b/_images/zorder_demo_00.png
deleted file mode 100644
index 523911e8069..00000000000
Binary files a/_images/zorder_demo_00.png and /dev/null differ
diff --git a/_images/zorder_demo_01.png b/_images/zorder_demo_01.png
deleted file mode 100644
index e6b426097ee..00000000000
Binary files a/_images/zorder_demo_01.png and /dev/null differ
diff --git a/_sources/api/_as_gen/matplotlib.animation.Animation.save.rst.txt b/_sources/api/_as_gen/matplotlib.animation.Animation.save.rst.txt
deleted file mode 100644
index 206fafc1851..00000000000
--- a/_sources/api/_as_gen/matplotlib.animation.Animation.save.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.animation\.Animation\.save
-======================================
-
-.. currentmodule:: matplotlib.animation
-
-.. automethod:: Animation.save
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.animation.Animation.to_html5_video.rst.txt b/_sources/api/_as_gen/matplotlib.animation.Animation.to_html5_video.rst.txt
deleted file mode 100644
index 38f4aa7911e..00000000000
--- a/_sources/api/_as_gen/matplotlib.animation.Animation.to_html5_video.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.animation\.Animation\.to\_html5\_video
-==================================================
-
-.. currentmodule:: matplotlib.animation
-
-.. automethod:: Animation.to_html5_video
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.animation.FileMovieWriter.setup.rst.txt b/_sources/api/_as_gen/matplotlib.animation.FileMovieWriter.setup.rst.txt
deleted file mode 100644
index 67a70a5d465..00000000000
--- a/_sources/api/_as_gen/matplotlib.animation.FileMovieWriter.setup.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.animation\.FileMovieWriter\.setup
-=============================================
-
-.. currentmodule:: matplotlib.animation
-
-.. automethod:: FileMovieWriter.setup
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.animation.MovieWriter.finish.rst.txt b/_sources/api/_as_gen/matplotlib.animation.MovieWriter.finish.rst.txt
deleted file mode 100644
index 49d0ddf6a3e..00000000000
--- a/_sources/api/_as_gen/matplotlib.animation.MovieWriter.finish.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.animation\.MovieWriter\.finish
-==========================================
-
-.. currentmodule:: matplotlib.animation
-
-.. automethod:: MovieWriter.finish
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.animation.MovieWriter.grab_frame.rst.txt b/_sources/api/_as_gen/matplotlib.animation.MovieWriter.grab_frame.rst.txt
deleted file mode 100644
index 593f2e4872e..00000000000
--- a/_sources/api/_as_gen/matplotlib.animation.MovieWriter.grab_frame.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.animation\.MovieWriter\.grab\_frame
-===============================================
-
-.. currentmodule:: matplotlib.animation
-
-.. automethod:: MovieWriter.grab_frame
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.animation.MovieWriter.saving.rst.txt b/_sources/api/_as_gen/matplotlib.animation.MovieWriter.saving.rst.txt
deleted file mode 100644
index dbbb0cde664..00000000000
--- a/_sources/api/_as_gen/matplotlib.animation.MovieWriter.saving.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.animation\.MovieWriter\.saving
-==========================================
-
-.. currentmodule:: matplotlib.animation
-
-.. automethod:: MovieWriter.saving
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.animation.MovieWriter.setup.rst.txt b/_sources/api/_as_gen/matplotlib.animation.MovieWriter.setup.rst.txt
deleted file mode 100644
index 0f7899f5fcd..00000000000
--- a/_sources/api/_as_gen/matplotlib.animation.MovieWriter.setup.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.animation\.MovieWriter\.setup
-=========================================
-
-.. currentmodule:: matplotlib.animation
-
-.. automethod:: MovieWriter.setup
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.artist.Artist.get_axes.rst.txt b/_sources/api/_as_gen/matplotlib.artist.Artist.get_axes.rst.txt
deleted file mode 100644
index acd26c34473..00000000000
--- a/_sources/api/_as_gen/matplotlib.artist.Artist.get_axes.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.artist\.Artist\.get\_axes
-=====================================
-
-.. currentmodule:: matplotlib.artist
-
-.. automethod:: Artist.get_axes
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.artist.Artist.set_axes.rst.txt b/_sources/api/_as_gen/matplotlib.artist.Artist.set_axes.rst.txt
deleted file mode 100644
index c0c709bfee3..00000000000
--- a/_sources/api/_as_gen/matplotlib.artist.Artist.set_axes.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.artist\.Artist\.set\_axes
-=====================================
-
-.. currentmodule:: matplotlib.artist
-
-.. automethod:: Artist.set_axes
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.axes.Axes.get_axes.rst.txt b/_sources/api/_as_gen/matplotlib.axes.Axes.get_axes.rst.txt
deleted file mode 100644
index 5839c762a33..00000000000
--- a/_sources/api/_as_gen/matplotlib.axes.Axes.get_axes.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.axes\.Axes\.get\_axes
-=================================
-
-.. currentmodule:: matplotlib.axes
-
-.. automethod:: Axes.get_axes
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.axes.Axes.set_axes.rst.txt b/_sources/api/_as_gen/matplotlib.axes.Axes.set_axes.rst.txt
deleted file mode 100644
index 52a7d9434c9..00000000000
--- a/_sources/api/_as_gen/matplotlib.axes.Axes.set_axes.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.axes\.Axes\.set\_axes
-=================================
-
-.. currentmodule:: matplotlib.axes
-
-.. automethod:: Axes.set_axes
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.axis.Axis.get_axes.rst.txt b/_sources/api/_as_gen/matplotlib.axis.Axis.get_axes.rst.txt
deleted file mode 100644
index 96db725ba60..00000000000
--- a/_sources/api/_as_gen/matplotlib.axis.Axis.get_axes.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.axis\.Axis\.get\_axes
-=================================
-
-.. currentmodule:: matplotlib.axis
-
-.. automethod:: Axis.get_axes
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.axis.Axis.set_axes.rst.txt b/_sources/api/_as_gen/matplotlib.axis.Axis.set_axes.rst.txt
deleted file mode 100644
index b52738e0752..00000000000
--- a/_sources/api/_as_gen/matplotlib.axis.Axis.set_axes.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.axis\.Axis\.set\_axes
-=================================
-
-.. currentmodule:: matplotlib.axis
-
-.. automethod:: Axis.set_axes
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.axis.Tick.get_axes.rst.txt b/_sources/api/_as_gen/matplotlib.axis.Tick.get_axes.rst.txt
deleted file mode 100644
index 98ee751ba81..00000000000
--- a/_sources/api/_as_gen/matplotlib.axis.Tick.get_axes.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.axis\.Tick\.get\_axes
-=================================
-
-.. currentmodule:: matplotlib.axis
-
-.. automethod:: Tick.get_axes
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.axis.Tick.set_axes.rst.txt b/_sources/api/_as_gen/matplotlib.axis.Tick.set_axes.rst.txt
deleted file mode 100644
index 24757a14f20..00000000000
--- a/_sources/api/_as_gen/matplotlib.axis.Tick.set_axes.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.axis\.Tick\.set\_axes
-=================================
-
-.. currentmodule:: matplotlib.axis
-
-.. automethod:: Tick.set_axes
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.axis.XAxis.get_axes.rst.txt b/_sources/api/_as_gen/matplotlib.axis.XAxis.get_axes.rst.txt
deleted file mode 100644
index 87033a8156e..00000000000
--- a/_sources/api/_as_gen/matplotlib.axis.XAxis.get_axes.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.axis\.XAxis\.get\_axes
-==================================
-
-.. currentmodule:: matplotlib.axis
-
-.. automethod:: XAxis.get_axes
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.axis.XAxis.set_axes.rst.txt b/_sources/api/_as_gen/matplotlib.axis.XAxis.set_axes.rst.txt
deleted file mode 100644
index cbefc472537..00000000000
--- a/_sources/api/_as_gen/matplotlib.axis.XAxis.set_axes.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.axis\.XAxis\.set\_axes
-==================================
-
-.. currentmodule:: matplotlib.axis
-
-.. automethod:: XAxis.set_axes
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.axis.XTick.get_axes.rst.txt b/_sources/api/_as_gen/matplotlib.axis.XTick.get_axes.rst.txt
deleted file mode 100644
index a0a99ac1ce7..00000000000
--- a/_sources/api/_as_gen/matplotlib.axis.XTick.get_axes.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.axis\.XTick\.get\_axes
-==================================
-
-.. currentmodule:: matplotlib.axis
-
-.. automethod:: XTick.get_axes
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.axis.XTick.set_axes.rst.txt b/_sources/api/_as_gen/matplotlib.axis.XTick.set_axes.rst.txt
deleted file mode 100644
index 0fa76d9e320..00000000000
--- a/_sources/api/_as_gen/matplotlib.axis.XTick.set_axes.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.axis\.XTick\.set\_axes
-==================================
-
-.. currentmodule:: matplotlib.axis
-
-.. automethod:: XTick.set_axes
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.axis.YAxis.get_axes.rst.txt b/_sources/api/_as_gen/matplotlib.axis.YAxis.get_axes.rst.txt
deleted file mode 100644
index ff48cb3fdf8..00000000000
--- a/_sources/api/_as_gen/matplotlib.axis.YAxis.get_axes.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.axis\.YAxis\.get\_axes
-==================================
-
-.. currentmodule:: matplotlib.axis
-
-.. automethod:: YAxis.get_axes
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.axis.YAxis.set_axes.rst.txt b/_sources/api/_as_gen/matplotlib.axis.YAxis.set_axes.rst.txt
deleted file mode 100644
index 652380cd68c..00000000000
--- a/_sources/api/_as_gen/matplotlib.axis.YAxis.set_axes.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.axis\.YAxis\.set\_axes
-==================================
-
-.. currentmodule:: matplotlib.axis
-
-.. automethod:: YAxis.set_axes
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.axis.YTick.get_axes.rst.txt b/_sources/api/_as_gen/matplotlib.axis.YTick.get_axes.rst.txt
deleted file mode 100644
index 483fa5115a7..00000000000
--- a/_sources/api/_as_gen/matplotlib.axis.YTick.get_axes.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.axis\.YTick\.get\_axes
-==================================
-
-.. currentmodule:: matplotlib.axis
-
-.. automethod:: YTick.get_axes
\ No newline at end of file
diff --git a/_sources/api/_as_gen/matplotlib.axis.YTick.set_axes.rst.txt b/_sources/api/_as_gen/matplotlib.axis.YTick.set_axes.rst.txt
deleted file mode 100644
index dcc6a9a7dac..00000000000
--- a/_sources/api/_as_gen/matplotlib.axis.YTick.set_axes.rst.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-matplotlib\.axis\.YTick\.set\_axes
-==================================
-
-.. currentmodule:: matplotlib.axis
-
-.. automethod:: YTick.set_axes
\ No newline at end of file
diff --git a/_sources/api/pyplot_api.rst.txt b/_sources/api/pyplot_api.rst.txt
deleted file mode 100644
index 94e3baac26f..00000000000
--- a/_sources/api/pyplot_api.rst.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-******
-pyplot
-******
-
-
-:mod:`matplotlib.pyplot`
-========================
-
-.. automodule:: matplotlib.pyplot
- :members:
- :undoc-members:
- :show-inheritance:
- :exclude-members: plotting, colormaps
diff --git a/_sources/examples/animation/animate_decay.rst.txt b/_sources/examples/animation/animate_decay.rst.txt
deleted file mode 100644
index c0e387bd6e7..00000000000
--- a/_sources/examples/animation/animate_decay.rst.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-.. _animation-animate_decay:
-
-animation example code: animate_decay.py
-========================================
-
-[`source code `_]
-
-::
-
- """
- =====
- Decay
- =====
-
- This example showcases a sinusoidal decay animation.
- """
-
-
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
-
- def data_gen(t=0):
- cnt = 0
- while cnt < 1000:
- cnt += 1
- t += 0.1
- yield t, np.sin(2*np.pi*t) * np.exp(-t/10.)
-
-
- def init():
- ax.set_ylim(-1.1, 1.1)
- ax.set_xlim(0, 10)
- del xdata[:]
- del ydata[:]
- line.set_data(xdata, ydata)
- return line,
-
- fig, ax = plt.subplots()
- line, = ax.plot([], [], lw=2)
- ax.grid()
- xdata, ydata = [], []
-
-
- def run(data):
- # update the data
- t, y = data
- xdata.append(t)
- ydata.append(y)
- xmin, xmax = ax.get_xlim()
-
- if t >= xmax:
- ax.set_xlim(xmin, 2*xmax)
- ax.figure.canvas.draw()
- line.set_data(xdata, ydata)
-
- return line,
-
- ani = animation.FuncAnimation(fig, run, data_gen, blit=False, interval=10,
- repeat=False, init_func=init)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/animate_decay.txt b/_sources/examples/animation/animate_decay.txt
deleted file mode 100644
index 5e6ce49f25e..00000000000
--- a/_sources/examples/animation/animate_decay.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-.. _animation-animate_decay:
-
-animation example code: animate_decay.py
-========================================
-
-[`source code `_]
-
-::
-
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
-
- def data_gen(t=0):
- cnt = 0
- while cnt < 1000:
- cnt += 1
- t += 0.1
- yield t, np.sin(2*np.pi*t) * np.exp(-t/10.)
-
-
- def init():
- ax.set_ylim(-1.1, 1.1)
- ax.set_xlim(0, 10)
- del xdata[:]
- del ydata[:]
- line.set_data(xdata, ydata)
- return line,
-
- fig, ax = plt.subplots()
- line, = ax.plot([], [], lw=2)
- ax.grid()
- xdata, ydata = [], []
-
-
- def run(data):
- # update the data
- t, y = data
- xdata.append(t)
- ydata.append(y)
- xmin, xmax = ax.get_xlim()
-
- if t >= xmax:
- ax.set_xlim(xmin, 2*xmax)
- ax.figure.canvas.draw()
- line.set_data(xdata, ydata)
-
- return line,
-
- ani = animation.FuncAnimation(fig, run, data_gen, blit=False, interval=10,
- repeat=False, init_func=init)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/animate_decay_tk_blit.txt b/_sources/examples/animation/animate_decay_tk_blit.txt
deleted file mode 100644
index 4c5a18367b4..00000000000
--- a/_sources/examples/animation/animate_decay_tk_blit.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-.. _animation-animate_decay_tk_blit:
-
-animation example code: animate_decay_tk_blit.py
-================================================
-
-[`source code `_]
-
-::
-
- import time, sys
- import numpy as np
- import matplotlib.pyplot as plt
-
-
- def data_gen():
- t = data_gen.t
- data_gen.t += 0.05
- return np.sin(2*np.pi*t) * np.exp(-t/10.)
- data_gen.t = 0
-
- fig = plt.figure()
- ax = fig.add_subplot(111)
- line, = ax.plot([], [], animated=True, lw=2)
- ax.set_ylim(-1.1, 1.1)
- ax.set_xlim(0, 5)
- ax.grid()
- xdata, ydata = [], []
- def run(*args):
- background = fig.canvas.copy_from_bbox(ax.bbox)
- # for profiling
- tstart = time.time()
-
- while 1:
- # restore the clean slate background
- fig.canvas.restore_region(background)
- # update the data
- t = data_gen.t
- y = data_gen()
- xdata.append(t)
- ydata.append(y)
- xmin, xmax = ax.get_xlim()
- if t>=xmax:
- ax.set_xlim(xmin, 2*xmax)
- fig.canvas.draw()
- background = fig.canvas.copy_from_bbox(ax.bbox)
-
- line.set_data(xdata, ydata)
-
- # just draw the animated artist
- ax.draw_artist(line)
- # just redraw the axes rectangle
- fig.canvas.blit(ax.bbox)
-
- if run.cnt==1000:
- # print the timing info and quit
- print 'FPS:' , 1000/(time.time()-tstart)
- sys.exit()
-
- run.cnt += 1
- run.cnt = 0
-
-
-
- manager = plt.get_current_fig_manager()
- manager.window.after(100, run)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/animation_blit_fltk.txt b/_sources/examples/animation/animation_blit_fltk.txt
deleted file mode 100644
index 9e2c18b1547..00000000000
--- a/_sources/examples/animation/animation_blit_fltk.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-.. _animation-animation_blit_fltk:
-
-animation example code: animation_blit_fltk.py
-==============================================
-
-[`source code `_]
-
-::
-
- import sys
- import fltk
- import matplotlib
- matplotlib.use('FltkAgg')
- import pylab as p
- import numpy as npy
- import time
-
-
- # save the clean slate background -- everything but the animated line
- # is drawn and saved in the pixel buffer background
- class animator:
- def __init__(self,ax):
- self.ax=ax
- self.canvas=ax.figure.canvas
- self.canvas.mpl_connect('draw_event',self.clear)
- self.cnt=0
- self.background=None
-
- # for profiling
- self.tstart = time.time()
-
- def clear(self,event):
- self.background = self.canvas.copy_from_bbox(self.ax.bbox)
-
- def update(self,ptr):
- # restore the clean slate background
- if self.background is None:
- self.background = self.canvas.copy_from_bbox(self.ax.bbox)
- self.canvas.restore_region(self.background)
- # update the data
- line.set_ydata(npy.sin(x+self.cnt/10.0))
- # just draw the animated artist
- self.ax.draw_artist(line)
- # just redraw the axes rectangle
- self.canvas.blit(ax.bbox)
- self.cnt+=1
- if self.cnt==1000:
- # print the timing info and quit
- print 'FPS:' , 1000/(time.time()-self.tstart)
- sys.exit()
- return True
-
- ax = p.subplot(111)
- p.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs
- p.grid() # to ensure proper background restore
- # create the initial line
- x = npy.arange(0,2*npy.pi,0.01)
- line, = p.plot(x, npy.sin(x), animated=True)
- p.draw()
- anim=animator(ax)
-
- fltk.Fl.add_idle(anim.update)
- fltk.Fl.run()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/animation_blit_gtk.txt b/_sources/examples/animation/animation_blit_gtk.txt
deleted file mode 100644
index 1f21a8f7084..00000000000
--- a/_sources/examples/animation/animation_blit_gtk.txt
+++ /dev/null
@@ -1,85 +0,0 @@
-.. _animation-animation_blit_gtk:
-
-animation example code: animation_blit_gtk.py
-=============================================
-
-[`source code `_]
-
-::
-
- #!/usr/bin/env python
-
- # For detailed comments on animation and the techniques used here, see
- # the wiki entry
- # http://www.scipy.org/wikis/topical_software/MatplotlibAnimation
- import time
-
- import gtk, gobject
-
- import matplotlib
- matplotlib.use('GTKAgg')
-
- import numpy as np
- import matplotlib.pyplot as plt
-
-
- fig = plt.figure()
- ax = fig.add_subplot(111)
- canvas = fig.canvas
-
- fig.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs
- ax.grid() # to ensure proper background restore
-
- # create the initial line
- x = np.arange(0,2*np.pi,0.01)
- line, = ax.plot(x, np.sin(x), animated=True, lw=2)
- canvas.draw()
-
- # for profiling
- tstart = time.time()
-
- def on_draw(event):
- background = canvas.copy_from_bbox(ax.bbox)
- if on_draw.background is None:
- gobject.idle_add(update_line)
-
- on_draw.background = background
-
- on_draw.background = None
-
- fig.canvas.mpl_connect('draw_event', on_draw)
-
- def update_line(*args):
- if on_draw.background is None:
- return True
-
- print 'frame', update_line.cnt
-
- # restore the clean slate background
- canvas.restore_region(on_draw.background)
- # update the data
- line.set_ydata(np.sin(x+update_line.cnt/10.0))
-
- # just draw the animated artist
- ax.draw_artist(line)
-
- # just redraw the axes rectangle
- canvas.blit(ax.bbox)
-
- if update_line.cnt==1000:
- # print the timing info and quit
- print 'FPS:' , 1000/(time.time()-tstart)
- gtk.mainquit()
- raise SystemExit
-
- update_line.cnt += 1
- return True
-
- update_line.cnt = 0
-
-
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/animation_blit_gtk2.txt b/_sources/examples/animation/animation_blit_gtk2.txt
deleted file mode 100644
index 64c2dcf78fc..00000000000
--- a/_sources/examples/animation/animation_blit_gtk2.txt
+++ /dev/null
@@ -1,179 +0,0 @@
-.. _animation-animation_blit_gtk2:
-
-animation example code: animation_blit_gtk2.py
-==============================================
-
-[`source code `_]
-
-::
-
- #!/usr/bin/env python
-
- """
- This example utlizes restore_region with optional bbox and xy
- arguments. The plot is continuously shifted to the left. Instead of
- drawing everything again, the plot is saved (copy_from_bbox) and
- restored with offset by the amount of the shift. And only newly
- exposed area is drawn. This technique may reduce drawing time for some cases.
- """
-
- import time
-
- import gtk, gobject
-
- import matplotlib
- matplotlib.use('GTKAgg')
-
- import numpy as np
- import matplotlib.pyplot as plt
-
- class UpdateLine(object):
- def get_bg_bbox(self):
-
- return self.ax.bbox.padded(-3)
-
- def __init__(self, canvas, ax):
- self.cnt = 0
- self.canvas = canvas
- self.ax = ax
-
- self.prev_time = time.time()
- self.start_time = self.prev_time
- self.prev_pixel_offset = 0.
-
-
- self.x0 = 0
- self.phases = np.random.random_sample((20,)) * np.pi * 2
- self.line, = ax.plot([], [], "-", animated=True, lw=2)
-
- self.point, = ax.plot([], [], "ro", animated=True, lw=2)
-
- self.ax.set_ylim(-1.1, 1.1)
-
- self.background1 = None
-
- cmap = plt.cm.jet
- from itertools import cycle
- self.color_cycle = cycle(cmap(np.arange(cmap.N)))
-
-
- def save_bg(self):
- self.background1 = self.canvas.copy_from_bbox(self.ax.get_figure().bbox)
-
- self.background2 = self.canvas.copy_from_bbox(self.get_bg_bbox())
-
-
- def get_dx_data(self, dx_pixel):
- tp = self.ax.transData.inverted().transform_point
- x0, y0 = tp((0, 0))
- x1, y1 = tp((dx_pixel, 0))
- return (x1-x0)
-
-
- def restore_background_shifted(self, dx_pixel):
- """
- restore bacground shifted by dx in data coordinate. This only
- works if the data coordinate system is linear.
- """
-
- # restore the clean slate background
- self.canvas.restore_region(self.background1)
-
- # restore subregion (x1+dx, y1, x2, y2) of the second bg
- # in a offset position (x1-dx, y1)
- x1, y1, x2, y2 = self.background2.get_extents()
- self.canvas.restore_region(self.background2,
- bbox=(x1+dx_pixel, y1, x2, y2),
- xy=(x1-dx_pixel, y1))
-
- return dx_pixel
-
- def on_draw(self, *args):
- self.save_bg()
- return False
-
- def update_line(self, *args):
-
- if self.background1 is None:
- return True
-
- cur_time = time.time()
- pixel_offset = int((cur_time - self.start_time)*100.)
- dx_pixel = pixel_offset - self.prev_pixel_offset
- self.prev_pixel_offset = pixel_offset
- dx_data = self.get_dx_data(dx_pixel) #cur_time - self.prev_time)
-
- x0 = self.x0
- self.x0 += dx_data
- self.prev_time = cur_time
-
- self.ax.set_xlim(self.x0-2, self.x0+0.1)
-
-
- # restore background which will plot lines from previous plots
- self.restore_background_shifted(dx_pixel) #x0, self.x0)
- # This restores lines between [x0-2, x0]
-
-
-
- self.line.set_color(self.color_cycle.next())
-
- # now plot line segment within [x0, x0+dx_data],
- # Note that we're only plotting a line between [x0, x0+dx_data].
- xx = np.array([x0, self.x0])
- self.line.set_xdata(xx)
-
- # the for loop below could be improved by using collection.
- [(self.line.set_ydata(np.sin(xx+p)),
- self.ax.draw_artist(self.line)) \
- for p in self.phases]
-
- self.background2 = canvas.copy_from_bbox(self.get_bg_bbox())
-
- self.point.set_xdata([self.x0])
-
- [(self.point.set_ydata(np.sin([self.x0+p])),
- self.ax.draw_artist(self.point)) \
- for p in self.phases]
-
-
- self.ax.draw_artist(self.ax.xaxis)
- self.ax.draw_artist(self.ax.yaxis)
-
- self.canvas.blit(self.ax.get_figure().bbox)
-
-
- dt = (time.time()-tstart)
- if dt>15:
- # print the timing info and quit
- print 'FPS:' , self.cnt/dt
- gtk.main_quit()
- raise SystemExit
-
- self.cnt += 1
- return True
-
-
- plt.rcParams["text.usetex"] = False
- fig = plt.figure()
-
- ax = fig.add_subplot(111)
- ax.xaxis.set_animated(True)
- ax.yaxis.set_animated(True)
- canvas = fig.canvas
-
- fig.subplots_adjust(left=0.2, bottom=0.2)
- canvas.draw()
-
- # for profiling
- tstart = time.time()
-
- ul = UpdateLine(canvas, ax)
- gobject.idle_add(ul.update_line)
-
- canvas.mpl_connect('draw_event', ul.on_draw)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/animation_blit_qt.txt b/_sources/examples/animation/animation_blit_qt.txt
deleted file mode 100644
index 046c0f8b9f5..00000000000
--- a/_sources/examples/animation/animation_blit_qt.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-.. _animation-animation_blit_qt:
-
-animation example code: animation_blit_qt.py
-============================================
-
-[`source code `_]
-
-::
-
- # For detailed comments on animation and the techniqes used here, see
- # the wiki entry http://www.scipy.org/Cookbook/Matplotlib/Animations
-
- import os, sys
- import matplotlib
- matplotlib.use('QtAgg') # qt3 example
-
- from qt import *
- # Note: color-intensive applications may require a different color allocation
- # strategy.
- QApplication.setColorSpec(QApplication.NormalColor)
-
- TRUE = 1
- FALSE = 0
- ITERS = 1000
-
- import pylab as p
- import numpy as npy
- import time
-
- class BlitQT(QObject):
- def __init__(self):
- QObject.__init__(self, None, "app")
-
- self.ax = p.subplot(111)
- self.canvas = self.ax.figure.canvas
- self.cnt = 0
-
- # create the initial line
- self.x = npy.arange(0,2*npy.pi,0.01)
- self.line, = p.plot(self.x, npy.sin(self.x), animated=True, lw=2)
-
- self.background = None
-
- def timerEvent(self, evt):
- if self.background is None:
- self.background = self.canvas.copy_from_bbox(self.ax.bbox)
-
- # restore the clean slate background
- self.canvas.restore_region(self.background)
- # update the data
- self.line.set_ydata(npy.sin(self.x+self.cnt/10.0))
- # just draw the animated artist
- self.ax.draw_artist(self.line)
- # just redraw the axes rectangle
- self.canvas.blit(self.ax.bbox)
-
- if self.cnt==ITERS:
- # print the timing info and quit
- print 'FPS:' , ITERS/(time.time()-self.tstart)
- sys.exit()
-
- else:
- self.cnt += 1
-
- p.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs
- p.grid() # to ensure proper background restore
-
- app = BlitQT()
- # for profiling
- app.tstart = time.time()
- app.startTimer(0)
-
- p.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/animation_blit_qt4.txt b/_sources/examples/animation/animation_blit_qt4.txt
deleted file mode 100644
index bcef10f8b6d..00000000000
--- a/_sources/examples/animation/animation_blit_qt4.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-.. _animation-animation_blit_qt4:
-
-animation example code: animation_blit_qt4.py
-=============================================
-
-[`source code `_]
-
-::
-
- # For detailed comments on animation and the techniqes used here, see
- # the wiki entry http://www.scipy.org/Cookbook/Matplotlib/Animations
-
- import os
- import sys
-
- #import matplotlib
- #matplotlib.use('Qt4Agg')
- from matplotlib.figure import Figure
- from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
-
- from PyQt4 import QtCore, QtGui
-
- ITERS = 1000
-
- import numpy as np
- import time
-
- class BlitQT(FigureCanvas):
-
- def __init__(self):
- FigureCanvas.__init__(self, Figure())
-
- self.ax = self.figure.add_subplot(111)
- self.ax.grid()
- self.draw()
-
- self.old_size = self.ax.bbox.width, self.ax.bbox.height
- self.ax_background = self.copy_from_bbox(self.ax.bbox)
- self.cnt = 0
-
- self.x = np.arange(0,2*np.pi,0.01)
- self.sin_line, = self.ax.plot(self.x, np.sin(self.x), animated=True)
- self.cos_line, = self.ax.plot(self.x, np.cos(self.x), animated=True)
- self.draw()
-
- self.tstart = time.time()
- self.startTimer(10)
-
- def timerEvent(self, evt):
- current_size = self.ax.bbox.width, self.ax.bbox.height
- if self.old_size != current_size:
- self.old_size = current_size
- self.ax.clear()
- self.ax.grid()
- self.draw()
- self.ax_background = self.copy_from_bbox(self.ax.bbox)
-
- self.restore_region(self.ax_background)
-
- # update the data
- self.sin_line.set_ydata(np.sin(self.x+self.cnt/10.0))
- self.cos_line.set_ydata(np.cos(self.x+self.cnt/10.0))
- # just draw the animated artist
- self.ax.draw_artist(self.sin_line)
- self.ax.draw_artist(self.cos_line)
- # just redraw the axes rectangle
- self.blit(self.ax.bbox)
-
- if self.cnt == 0:
- # TODO: this shouldn't be necessary, but if it is excluded the
- # canvas outside the axes is not initially painted.
- self.draw()
- if self.cnt==ITERS:
- # print the timing info and quit
- print 'FPS:' , ITERS/(time.time()-self.tstart)
- sys.exit()
- else:
- self.cnt += 1
-
- app = QtGui.QApplication(sys.argv)
- widget = BlitQT()
- widget.show()
-
- sys.exit(app.exec_())
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/animation_blit_tk.txt b/_sources/examples/animation/animation_blit_tk.txt
deleted file mode 100644
index df320c53348..00000000000
--- a/_sources/examples/animation/animation_blit_tk.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-.. _animation-animation_blit_tk:
-
-animation example code: animation_blit_tk.py
-============================================
-
-[`source code `_]
-
-::
-
- # For detailed comments on animation and the techniqes used here, see
- # the wiki entry http://www.scipy.org/Cookbook/Matplotlib/Animations
-
- import matplotlib
- matplotlib.use('TkAgg')
-
- import sys
- import pylab as p
- import numpy as npy
- import time
-
- ax = p.subplot(111)
- canvas = ax.figure.canvas
-
-
- # create the initial line
- x = npy.arange(0,2*npy.pi,0.01)
- line, = p.plot(x, npy.sin(x), animated=True, lw=2)
-
- def run(*args):
- background = canvas.copy_from_bbox(ax.bbox)
- # for profiling
- tstart = time.time()
-
- while 1:
- # restore the clean slate background
- canvas.restore_region(background)
- # update the data
- line.set_ydata(npy.sin(x+run.cnt/10.0))
- # just draw the animated artist
- ax.draw_artist(line)
- # just redraw the axes rectangle
- canvas.blit(ax.bbox)
-
- if run.cnt==1000:
- # print the timing info and quit
- print 'FPS:' , 1000/(time.time()-tstart)
- sys.exit()
-
- run.cnt += 1
- run.cnt = 0
-
-
- p.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs
- p.grid() # to ensure proper background restore
- manager = p.get_current_fig_manager()
- manager.window.after(100, run)
-
- p.show()
-
-
-
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/animation_blit_wx.txt b/_sources/examples/animation/animation_blit_wx.txt
deleted file mode 100644
index 6fab4513d7b..00000000000
--- a/_sources/examples/animation/animation_blit_wx.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-.. _animation-animation_blit_wx:
-
-animation example code: animation_blit_wx.py
-============================================
-
-[`source code `_]
-
-::
-
- # For detailed comments on animation and the techniqes used here, see
- # the wiki entry
- # http://www.scipy.org/wikis/topical_software/MatplotlibAnimation
-
- # The number of blits() to make before exiting
- NBLITS = 1000
-
- import matplotlib
- matplotlib.use('WXAgg')
- matplotlib.rcParams['toolbar'] = 'None'
-
- import wx
- import sys
- import pylab as p
- import numpy as npy
- import time
-
-
- # allow the user to disable the WXAgg accelerator from the command line
- if '--no-accel' in sys.argv:
- import matplotlib.backends.backend_wxagg
- matplotlib.backends.backend_wxagg._use_accelerator(False)
-
-
- ax = p.subplot(111)
- canvas = ax.figure.canvas
-
-
- p.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs
- p.grid() # to ensure proper background restore
-
- # create the initial line
- x = npy.arange(0,2*npy.pi,0.01)
- line, = p.plot(x, npy.sin(x), animated=True, lw=2)
-
- # for profiling
- tstart = time.time()
- blit_time = 0.0
-
- def update_line(*args):
- global blit_time
-
- if update_line.background is None:
- update_line.background = canvas.copy_from_bbox(ax.bbox)
-
- # restore the clean slate background
- canvas.restore_region(update_line.background)
- # update the data
- line.set_ydata(npy.sin(x+update_line.cnt/10.0))
- # just draw the animated artist
- ax.draw_artist(line)
- # just redraw the axes rectangle
-
- t = time.time()
- canvas.blit(ax.bbox)
- blit_time += time.time() - t
-
- if update_line.cnt == NBLITS:
- # print the timing info and quit
- frame_time = time.time() - tstart
- print '%d frames: %.2f seconds' % (NBLITS, frame_time)
- print '%d blits: %.2f seconds' % (NBLITS, blit_time)
- print
- print 'FPS: %.2f' % (NBLITS/frame_time)
- print 'BPS: %.2f' % (NBLITS/blit_time)
- sys.exit()
-
- update_line.cnt += 1
- wx.WakeUpIdle()
-
-
-
- update_line.cnt = 0
- update_line.background = None
- wx.EVT_IDLE(wx.GetApp(), update_line)
- p.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/basic_example.rst.txt b/_sources/examples/animation/basic_example.rst.txt
deleted file mode 100644
index 515dc2b8a59..00000000000
--- a/_sources/examples/animation/basic_example.rst.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-.. _animation-basic_example:
-
-animation example code: basic_example.py
-========================================
-
-[`source code `_]
-
-::
-
- """
- =========================
- Simple animation examples
- =========================
-
- This example contains two animations. The first is a random walk plot. The
- second is an image animation.
- """
-
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
-
- def update_line(num, data, line):
- line.set_data(data[..., :num])
- return line,
-
- fig1 = plt.figure()
-
- data = np.random.rand(2, 25)
- l, = plt.plot([], [], 'r-')
- plt.xlim(0, 1)
- plt.ylim(0, 1)
- plt.xlabel('x')
- plt.title('test')
- line_ani = animation.FuncAnimation(fig1, update_line, 25, fargs=(data, l),
- interval=50, blit=True)
-
- # To save the animation, use the command: line_ani.save('lines.mp4')
-
- fig2 = plt.figure()
-
- x = np.arange(-9, 10)
- y = np.arange(-9, 10).reshape(-1, 1)
- base = np.hypot(x, y)
- ims = []
- for add in np.arange(15):
- ims.append((plt.pcolor(x, y, base + add, norm=plt.Normalize(0, 30)),))
-
- im_ani = animation.ArtistAnimation(fig2, ims, interval=50, repeat_delay=3000,
- blit=True)
- # To save this second animation with some metadata, use the following command:
- # im_ani.save('im.mp4', metadata={'artist':'Guido'})
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/basic_example.txt b/_sources/examples/animation/basic_example.txt
deleted file mode 100644
index 122080df994..00000000000
--- a/_sources/examples/animation/basic_example.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-.. _animation-basic_example:
-
-animation example code: basic_example.py
-========================================
-
-[`source code `_]
-
-::
-
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
-
- def update_line(num, data, line):
- line.set_data(data[..., :num])
- return line,
-
- fig1 = plt.figure()
-
- data = np.random.rand(2, 25)
- l, = plt.plot([], [], 'r-')
- plt.xlim(0, 1)
- plt.ylim(0, 1)
- plt.xlabel('x')
- plt.title('test')
- line_ani = animation.FuncAnimation(fig1, update_line, 25, fargs=(data, l),
- interval=50, blit=True)
- #line_ani.save('lines.mp4')
-
- fig2 = plt.figure()
-
- x = np.arange(-9, 10)
- y = np.arange(-9, 10).reshape(-1, 1)
- base = np.hypot(x, y)
- ims = []
- for add in np.arange(15):
- ims.append((plt.pcolor(x, y, base + add, norm=plt.Normalize(0, 30)),))
-
- im_ani = animation.ArtistAnimation(fig2, ims, interval=50, repeat_delay=3000,
- blit=True)
- #im_ani.save('im.mp4', metadata={'artist':'Guido'})
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/basic_example_writer.rst.txt b/_sources/examples/animation/basic_example_writer.rst.txt
deleted file mode 100644
index 9ca1864c025..00000000000
--- a/_sources/examples/animation/basic_example_writer.rst.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-.. _animation-basic_example_writer:
-
-animation example code: basic_example_writer.py
-===============================================
-
-[`source code `_]
-
-::
-
- """
- ===================
- Saving an animation
- ===================
-
- This example showcases the same animations as `basic_example.py`, but instead
- of displaying the animation to the user, it writes to files using a
- MovieWriter instance.
- """
-
- # -*- noplot -*-
- import numpy as np
- import matplotlib
- matplotlib.use("Agg")
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
-
- def update_line(num, data, line):
- line.set_data(data[..., :num])
- return line,
-
- # Set up formatting for the movie files
- Writer = animation.writers['ffmpeg']
- writer = Writer(fps=15, metadata=dict(artist='Me'), bitrate=1800)
-
-
- fig1 = plt.figure()
-
- data = np.random.rand(2, 25)
- l, = plt.plot([], [], 'r-')
- plt.xlim(0, 1)
- plt.ylim(0, 1)
- plt.xlabel('x')
- plt.title('test')
- line_ani = animation.FuncAnimation(fig1, update_line, 25, fargs=(data, l),
- interval=50, blit=True)
- line_ani.save('lines.mp4', writer=writer)
-
- fig2 = plt.figure()
-
- x = np.arange(-9, 10)
- y = np.arange(-9, 10).reshape(-1, 1)
- base = np.hypot(x, y)
- ims = []
- for add in np.arange(15):
- ims.append((plt.pcolor(x, y, base + add, norm=plt.Normalize(0, 30)),))
-
- im_ani = animation.ArtistAnimation(fig2, ims, interval=50, repeat_delay=3000,
- blit=True)
- im_ani.save('im.mp4', writer=writer)
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/basic_example_writer.txt b/_sources/examples/animation/basic_example_writer.txt
deleted file mode 100644
index 45734942ddb..00000000000
--- a/_sources/examples/animation/basic_example_writer.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-.. _animation-basic_example_writer:
-
-animation example code: basic_example_writer.py
-===============================================
-
-[`source code `_]
-
-::
-
- # Same as basic_example, but writes files using a single MovieWriter instance
- # without putting on screen
- # -*- noplot -*-
- import numpy as np
- import matplotlib
- matplotlib.use("Agg")
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
-
- def update_line(num, data, line):
- line.set_data(data[..., :num])
- return line,
-
- # Set up formatting for the movie files
- Writer = animation.writers['ffmpeg']
- writer = Writer(fps=15, metadata=dict(artist='Me'), bitrate=1800)
-
-
- fig1 = plt.figure()
-
- data = np.random.rand(2, 25)
- l, = plt.plot([], [], 'r-')
- plt.xlim(0, 1)
- plt.ylim(0, 1)
- plt.xlabel('x')
- plt.title('test')
- line_ani = animation.FuncAnimation(fig1, update_line, 25, fargs=(data, l),
- interval=50, blit=True)
- line_ani.save('lines.mp4', writer=writer)
-
- fig2 = plt.figure()
-
- x = np.arange(-9, 10)
- y = np.arange(-9, 10).reshape(-1, 1)
- base = np.hypot(x, y)
- ims = []
- for add in np.arange(15):
- ims.append((plt.pcolor(x, y, base + add, norm=plt.Normalize(0, 30)),))
-
- im_ani = animation.ArtistAnimation(fig2, ims, interval=50, repeat_delay=3000,
- blit=True)
- im_ani.save('im.mp4', writer=writer)
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/bayes_update.rst.txt b/_sources/examples/animation/bayes_update.rst.txt
deleted file mode 100644
index 08a0b398e59..00000000000
--- a/_sources/examples/animation/bayes_update.rst.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-.. _animation-bayes_update:
-
-animation example code: bayes_update.py
-=======================================
-
-[`source code `_]
-
-::
-
- """
- ================
- The Bayes update
- ================
-
- This animation displays the posterior estimate updates as it is refitted when
- new data arrives.
- The vertical line represents the theoretical value to which the plotted
- distribution should converge.
- """
-
- # update a distribution based on new data.
- import numpy as np
- import matplotlib.pyplot as plt
- import scipy.stats as ss
- from matplotlib.animation import FuncAnimation
-
-
- class UpdateDist(object):
- def __init__(self, ax, prob=0.5):
- self.success = 0
- self.prob = prob
- self.line, = ax.plot([], [], 'k-')
- self.x = np.linspace(0, 1, 200)
- self.ax = ax
-
- # Set up plot parameters
- self.ax.set_xlim(0, 1)
- self.ax.set_ylim(0, 15)
- self.ax.grid(True)
-
- # This vertical line represents the theoretical value, to
- # which the plotted distribution should converge.
- self.ax.axvline(prob, linestyle='--', color='black')
-
- def init(self):
- self.success = 0
- self.line.set_data([], [])
- return self.line,
-
- def __call__(self, i):
- # This way the plot can continuously run and we just keep
- # watching new realizations of the process
- if i == 0:
- return self.init()
-
- # Choose success based on exceed a threshold with a uniform pick
- if np.random.rand(1,) < self.prob:
- self.success += 1
- y = ss.beta.pdf(self.x, self.success + 1, (i - self.success) + 1)
- self.line.set_data(self.x, y)
- return self.line,
-
- fig, ax = plt.subplots()
- ud = UpdateDist(ax, prob=0.7)
- anim = FuncAnimation(fig, ud, frames=np.arange(100), init_func=ud.init,
- interval=100, blit=True)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/bayes_update.txt b/_sources/examples/animation/bayes_update.txt
deleted file mode 100644
index 00be7c0b7f2..00000000000
--- a/_sources/examples/animation/bayes_update.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-.. _animation-bayes_update:
-
-animation example code: bayes_update.py
-=======================================
-
-[`source code `_]
-
-::
-
- # update a distribution based on new data.
- import numpy as np
- import matplotlib.pyplot as plt
- import scipy.stats as ss
- from matplotlib.animation import FuncAnimation
-
-
- class UpdateDist(object):
- def __init__(self, ax, prob=0.5):
- self.success = 0
- self.prob = prob
- self.line, = ax.plot([], [], 'k-')
- self.x = np.linspace(0, 1, 200)
- self.ax = ax
-
- # Set up plot parameters
- self.ax.set_xlim(0, 1)
- self.ax.set_ylim(0, 15)
- self.ax.grid(True)
-
- # This vertical line represents the theoretical value, to
- # which the plotted distribution should converge.
- self.ax.axvline(prob, linestyle='--', color='black')
-
- def init(self):
- self.success = 0
- self.line.set_data([], [])
- return self.line,
-
- def __call__(self, i):
- # This way the plot can continuously run and we just keep
- # watching new realizations of the process
- if i == 0:
- return self.init()
-
- # Choose success based on exceed a threshold with a uniform pick
- if np.random.rand(1,) < self.prob:
- self.success += 1
- y = ss.beta.pdf(self.x, self.success + 1, (i - self.success) + 1)
- self.line.set_data(self.x, y)
- return self.line,
-
- fig, ax = plt.subplots()
- ud = UpdateDist(ax, prob=0.7)
- anim = FuncAnimation(fig, ud, frames=np.arange(100), init_func=ud.init,
- interval=100, blit=True)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/double_pendulum_animated.rst.txt b/_sources/examples/animation/double_pendulum_animated.rst.txt
deleted file mode 100644
index 89b88f0ad79..00000000000
--- a/_sources/examples/animation/double_pendulum_animated.rst.txt
+++ /dev/null
@@ -1,109 +0,0 @@
-.. _animation-double_pendulum_animated:
-
-animation example code: double_pendulum_animated.py
-===================================================
-
-[`source code `_]
-
-::
-
- """
- ===========================
- The double pendulum problem
- ===========================
-
- This animation illustrates the double pendulum problem.
- """
-
- # Double pendulum formula translated from the C code at
- # http://www.physics.usyd.edu.au/~wheat/dpend_html/solve_dpend.c
-
- from numpy import sin, cos
- import numpy as np
- import matplotlib.pyplot as plt
- import scipy.integrate as integrate
- import matplotlib.animation as animation
-
- G = 9.8 # acceleration due to gravity, in m/s^2
- L1 = 1.0 # length of pendulum 1 in m
- L2 = 1.0 # length of pendulum 2 in m
- M1 = 1.0 # mass of pendulum 1 in kg
- M2 = 1.0 # mass of pendulum 2 in kg
-
-
- def derivs(state, t):
-
- dydx = np.zeros_like(state)
- dydx[0] = state[1]
-
- del_ = state[2] - state[0]
- den1 = (M1 + M2)*L1 - M2*L1*cos(del_)*cos(del_)
- dydx[1] = (M2*L1*state[1]*state[1]*sin(del_)*cos(del_) +
- M2*G*sin(state[2])*cos(del_) +
- M2*L2*state[3]*state[3]*sin(del_) -
- (M1 + M2)*G*sin(state[0]))/den1
-
- dydx[2] = state[3]
-
- den2 = (L2/L1)*den1
- dydx[3] = (-M2*L2*state[3]*state[3]*sin(del_)*cos(del_) +
- (M1 + M2)*G*sin(state[0])*cos(del_) -
- (M1 + M2)*L1*state[1]*state[1]*sin(del_) -
- (M1 + M2)*G*sin(state[2]))/den2
-
- return dydx
-
- # create a time array from 0..100 sampled at 0.05 second steps
- dt = 0.05
- t = np.arange(0.0, 20, dt)
-
- # th1 and th2 are the initial angles (degrees)
- # w10 and w20 are the initial angular velocities (degrees per second)
- th1 = 120.0
- w1 = 0.0
- th2 = -10.0
- w2 = 0.0
-
- # initial state
- state = np.radians([th1, w1, th2, w2])
-
- # integrate your ODE using scipy.integrate.
- y = integrate.odeint(derivs, state, t)
-
- x1 = L1*sin(y[:, 0])
- y1 = -L1*cos(y[:, 0])
-
- x2 = L2*sin(y[:, 2]) + x1
- y2 = -L2*cos(y[:, 2]) + y1
-
- fig = plt.figure()
- ax = fig.add_subplot(111, autoscale_on=False, xlim=(-2, 2), ylim=(-2, 2))
- ax.grid()
-
- line, = ax.plot([], [], 'o-', lw=2)
- time_template = 'time = %.1fs'
- time_text = ax.text(0.05, 0.9, '', transform=ax.transAxes)
-
-
- def init():
- line.set_data([], [])
- time_text.set_text('')
- return line, time_text
-
-
- def animate(i):
- thisx = [0, x1[i], x2[i]]
- thisy = [0, y1[i], y2[i]]
-
- line.set_data(thisx, thisy)
- time_text.set_text(time_template % (i*dt))
- return line, time_text
-
- ani = animation.FuncAnimation(fig, animate, np.arange(1, len(y)),
- interval=25, blit=True, init_func=init)
-
- # ani.save('double_pendulum.mp4', fps=15)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/double_pendulum_animated.txt b/_sources/examples/animation/double_pendulum_animated.txt
deleted file mode 100644
index 8fe10c3cff7..00000000000
--- a/_sources/examples/animation/double_pendulum_animated.txt
+++ /dev/null
@@ -1,101 +0,0 @@
-.. _animation-double_pendulum_animated:
-
-animation example code: double_pendulum_animated.py
-===================================================
-
-[`source code `_]
-
-::
-
- # Double pendulum formula translated from the C code at
- # http://www.physics.usyd.edu.au/~wheat/dpend_html/solve_dpend.c
-
- from numpy import sin, cos
- import numpy as np
- import matplotlib.pyplot as plt
- import scipy.integrate as integrate
- import matplotlib.animation as animation
-
- G = 9.8 # acceleration due to gravity, in m/s^2
- L1 = 1.0 # length of pendulum 1 in m
- L2 = 1.0 # length of pendulum 2 in m
- M1 = 1.0 # mass of pendulum 1 in kg
- M2 = 1.0 # mass of pendulum 2 in kg
-
-
- def derivs(state, t):
-
- dydx = np.zeros_like(state)
- dydx[0] = state[1]
-
- del_ = state[2] - state[0]
- den1 = (M1 + M2)*L1 - M2*L1*cos(del_)*cos(del_)
- dydx[1] = (M2*L1*state[1]*state[1]*sin(del_)*cos(del_) +
- M2*G*sin(state[2])*cos(del_) +
- M2*L2*state[3]*state[3]*sin(del_) -
- (M1 + M2)*G*sin(state[0]))/den1
-
- dydx[2] = state[3]
-
- den2 = (L2/L1)*den1
- dydx[3] = (-M2*L2*state[3]*state[3]*sin(del_)*cos(del_) +
- (M1 + M2)*G*sin(state[0])*cos(del_) -
- (M1 + M2)*L1*state[1]*state[1]*sin(del_) -
- (M1 + M2)*G*sin(state[2]))/den2
-
- return dydx
-
- # create a time array from 0..100 sampled at 0.05 second steps
- dt = 0.05
- t = np.arange(0.0, 20, dt)
-
- # th1 and th2 are the initial angles (degrees)
- # w10 and w20 are the initial angular velocities (degrees per second)
- th1 = 120.0
- w1 = 0.0
- th2 = -10.0
- w2 = 0.0
-
- # initial state
- state = np.radians([th1, w1, th2, w2])
-
- # integrate your ODE using scipy.integrate.
- y = integrate.odeint(derivs, state, t)
-
- x1 = L1*sin(y[:, 0])
- y1 = -L1*cos(y[:, 0])
-
- x2 = L2*sin(y[:, 2]) + x1
- y2 = -L2*cos(y[:, 2]) + y1
-
- fig = plt.figure()
- ax = fig.add_subplot(111, autoscale_on=False, xlim=(-2, 2), ylim=(-2, 2))
- ax.grid()
-
- line, = ax.plot([], [], 'o-', lw=2)
- time_template = 'time = %.1fs'
- time_text = ax.text(0.05, 0.9, '', transform=ax.transAxes)
-
-
- def init():
- line.set_data([], [])
- time_text.set_text('')
- return line, time_text
-
-
- def animate(i):
- thisx = [0, x1[i], x2[i]]
- thisy = [0, y1[i], y2[i]]
-
- line.set_data(thisx, thisy)
- time_text.set_text(time_template % (i*dt))
- return line, time_text
-
- ani = animation.FuncAnimation(fig, animate, np.arange(1, len(y)),
- interval=25, blit=True, init_func=init)
-
- #ani.save('double_pendulum.mp4', fps=15)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/draggable_legend.txt b/_sources/examples/animation/draggable_legend.txt
deleted file mode 100644
index c291c3e2e57..00000000000
--- a/_sources/examples/animation/draggable_legend.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-.. _animation-draggable_legend:
-
-animation example code: draggable_legend.py
-===========================================
-
-[`source code `_]
-
-::
-
- import matplotlib.pyplot as plt
-
-
- ax = plt.subplot(111)
- ax.plot([1,2,3], label="test")
-
- l = ax.legend()
- d1 = l.draggable()
-
- xy = 1, 2
- txt = ax.annotate("Test", xy, xytext=(-30, 30),
- textcoords="offset points",
- bbox=dict(boxstyle="round",fc=(0.2, 1, 1)),
- arrowprops=dict(arrowstyle="->"))
- d2 = txt.draggable()
-
-
- from matplotlib._png import read_png
- from matplotlib.cbook import get_sample_data
-
- from matplotlib.offsetbox import OffsetImage, AnnotationBbox
-
- fn = get_sample_data("lena.png", asfileobj=False)
- arr_lena = read_png(fn)
-
- imagebox = OffsetImage(arr_lena, zoom=0.2)
-
- ab = AnnotationBbox(imagebox, xy,
- xybox=(120., -80.),
- xycoords='data',
- boxcoords="offset points",
- pad=0.5,
- arrowprops=dict(arrowstyle="->",
- connectionstyle="angle,angleA=0,angleB=90,rad=3")
- )
-
-
- ax.add_artist(ab)
-
- d3 = ab.draggable(use_blit=True)
-
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/dynamic_collection.txt b/_sources/examples/animation/dynamic_collection.txt
deleted file mode 100644
index bb0ec39c99e..00000000000
--- a/_sources/examples/animation/dynamic_collection.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-.. _animation-dynamic_collection:
-
-animation example code: dynamic_collection.py
-=============================================
-
-[`source code `_]
-
-::
-
- import random
- from matplotlib.collections import RegularPolyCollection
- import matplotlib.cm as cm
- from matplotlib.pyplot import figure, show
- from numpy.random import rand
-
- fig = figure()
- ax = fig.add_subplot(111, xlim=(0,1), ylim=(0,1), autoscale_on=False)
- ax.set_title("Press 'a' to add a point, 'd' to delete one")
- # a single point
- offsets = [(0.5,0.5)]
- facecolors = [cm.jet(0.5)]
-
- collection = RegularPolyCollection(
- #fig.dpi,
- 5, # a pentagon
- rotation=0,
- sizes=(50,),
- facecolors = facecolors,
- edgecolors = 'black',
- linewidths = (1,),
- offsets = offsets,
- transOffset = ax.transData,
- )
-
- ax.add_collection(collection)
-
- def onpress(event):
- """
- press 'a' to add a random point from the collection, 'd' to delete one
- """
- if event.key=='a':
- x,y = rand(2)
- color = cm.jet(rand())
- offsets.append((x,y))
- facecolors.append(color)
- collection.set_offsets(offsets)
- collection.set_facecolors(facecolors)
- fig.canvas.draw()
- elif event.key=='d':
- N = len(offsets)
- if N>0:
- ind = random.randint(0,N-1)
- offsets.pop(ind)
- facecolors.pop(ind)
- collection.set_offsets(offsets)
- collection.set_facecolors(facecolors)
- fig.canvas.draw()
-
- fig.canvas.mpl_connect('key_press_event', onpress)
-
- show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/dynamic_image.rst.txt b/_sources/examples/animation/dynamic_image.rst.txt
deleted file mode 100644
index a636b6656d3..00000000000
--- a/_sources/examples/animation/dynamic_image.rst.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-.. _animation-dynamic_image:
-
-animation example code: dynamic_image.py
-========================================
-
-[`source code `_]
-
-::
-
- """
- =================
- An animated image
- =================
-
- This example demonstrates how to animate an image.
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
- fig = plt.figure()
-
-
- def f(x, y):
- return np.sin(x) + np.cos(y)
-
- x = np.linspace(0, 2 * np.pi, 120)
- y = np.linspace(0, 2 * np.pi, 100).reshape(-1, 1)
-
- im = plt.imshow(f(x, y), animated=True)
-
-
- def updatefig(*args):
- global x, y
- x += np.pi / 15.
- y += np.pi / 20.
- im.set_array(f(x, y))
- return im,
-
- ani = animation.FuncAnimation(fig, updatefig, interval=50, blit=True)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/dynamic_image.txt b/_sources/examples/animation/dynamic_image.txt
deleted file mode 100644
index 50de7938416..00000000000
--- a/_sources/examples/animation/dynamic_image.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-.. _animation-dynamic_image:
-
-animation example code: dynamic_image.py
-========================================
-
-[`source code `_]
-
-::
-
- #!/usr/bin/env python
- """
- An animated image
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
- fig = plt.figure()
-
-
- def f(x, y):
- return np.sin(x) + np.cos(y)
-
- x = np.linspace(0, 2 * np.pi, 120)
- y = np.linspace(0, 2 * np.pi, 100).reshape(-1, 1)
-
- im = plt.imshow(f(x, y), cmap=plt.get_cmap('viridis'), animated=True)
-
-
- def updatefig(*args):
- global x, y
- x += np.pi / 15.
- y += np.pi / 20.
- im.set_array(f(x, y))
- return im,
-
- ani = animation.FuncAnimation(fig, updatefig, interval=50, blit=True)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/dynamic_image2.rst.txt b/_sources/examples/animation/dynamic_image2.rst.txt
deleted file mode 100644
index 48a4a055535..00000000000
--- a/_sources/examples/animation/dynamic_image2.rst.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-.. _animation-dynamic_image2:
-
-animation example code: dynamic_image2.py
-=========================================
-
-[`source code `_]
-
-::
-
- """
- ========================================
- An animated image using a list of images
- ========================================
-
- This examples demonstrates how to animate an image from a list of images (or
- Artists).
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
- fig = plt.figure()
-
-
- def f(x, y):
- return np.sin(x) + np.cos(y)
-
- x = np.linspace(0, 2 * np.pi, 120)
- y = np.linspace(0, 2 * np.pi, 100).reshape(-1, 1)
- # ims is a list of lists, each row is a list of artists to draw in the
- # current frame; here we are just animating one artist, the image, in
- # each frame
- ims = []
- for i in range(60):
- x += np.pi / 15.
- y += np.pi / 20.
- im = plt.imshow(f(x, y), animated=True)
- ims.append([im])
-
- ani = animation.ArtistAnimation(fig, ims, interval=50, blit=True,
- repeat_delay=1000)
-
- # ani.save('dynamic_images.mp4')
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/dynamic_image2.txt b/_sources/examples/animation/dynamic_image2.txt
deleted file mode 100644
index b424c428aa1..00000000000
--- a/_sources/examples/animation/dynamic_image2.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-.. _animation-dynamic_image2:
-
-animation example code: dynamic_image2.py
-=========================================
-
-[`source code `_]
-
-::
-
- #!/usr/bin/env python
- """
- An animated image
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
- fig = plt.figure()
-
-
- def f(x, y):
- return np.sin(x) + np.cos(y)
-
- x = np.linspace(0, 2 * np.pi, 120)
- y = np.linspace(0, 2 * np.pi, 100).reshape(-1, 1)
- # ims is a list of lists, each row is a list of artists to draw in the
- # current frame; here we are just animating one artist, the image, in
- # each frame
- ims = []
- for i in range(60):
- x += np.pi / 15.
- y += np.pi / 20.
- im = plt.imshow(f(x, y), cmap='viridis', animated=True)
- ims.append([im])
-
- ani = animation.ArtistAnimation(fig, ims, interval=50, blit=True,
- repeat_delay=1000)
-
- #ani.save('dynamic_images.mp4')
-
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/dynamic_image_gtkagg.txt b/_sources/examples/animation/dynamic_image_gtkagg.txt
deleted file mode 100644
index 99346f65037..00000000000
--- a/_sources/examples/animation/dynamic_image_gtkagg.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-.. _animation-dynamic_image_gtkagg:
-
-animation example code: dynamic_image_gtkagg.py
-===============================================
-
-[`source code `_]
-
-::
-
- #!/usr/bin/env python
- """
- An animated image
- """
- import time
-
- import gobject
- import gtk
-
- import matplotlib
- matplotlib.use('GTKAgg')
-
- from pylab import *
-
- fig = figure(1)
- a = subplot(111)
- x = arange(120.0)*2*pi/120.0
- x = resize(x, (100,120))
- y = arange(100.0)*2*pi/100.0
- y = resize(y, (120,100))
- y = transpose(y)
- z = sin(x) + cos(y)
- im = a.imshow( z, cmap=cm.jet)#, interpolation='nearest')
-
- manager = get_current_fig_manager()
- cnt = 0
- tstart = time.time()
- def updatefig(*args):
- global x, y, cnt, start
- x += pi/15
- y += pi/20
- z = sin(x) + cos(y)
- im.set_array(z)
- manager.canvas.draw()
- cnt += 1
- if cnt==50:
- print 'FPS', cnt/(time.time() - tstart)
- return False
- return True
-
- cnt = 0
-
- gobject.idle_add(updatefig)
- show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/dynamic_image_wxagg2.txt b/_sources/examples/animation/dynamic_image_wxagg2.txt
deleted file mode 100644
index 60f33a265c7..00000000000
--- a/_sources/examples/animation/dynamic_image_wxagg2.txt
+++ /dev/null
@@ -1,112 +0,0 @@
-.. _animation-dynamic_image_wxagg2:
-
-animation example code: dynamic_image_wxagg2.py
-===============================================
-
-[`source code `_]
-
-::
-
- #!/usr/bin/env python
- """
- Copyright (C) 2003-2005 Jeremy O'Donoghue and others
-
- License: This work is licensed under the PSF. A copy should be included
- with this source code, and is also available at
- http://www.python.org/psf/license.html
-
- """
- import sys, time, os, gc
-
- import matplotlib
- matplotlib.use('WXAgg')
-
- from matplotlib import rcParams
- import numpy as npy
-
- import matplotlib.cm as cm
-
- from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg
- from matplotlib.backends.backend_wx import NavigationToolbar2Wx
-
- from matplotlib.figure import Figure
- from wx import *
-
-
- TIMER_ID = NewId()
-
- class PlotFigure(Frame):
-
- def __init__(self):
- Frame.__init__(self, None, -1, "Test embedded wxFigure")
-
- self.fig = Figure((5,4), 75)
- self.canvas = FigureCanvasWxAgg(self, -1, self.fig)
- self.toolbar = NavigationToolbar2Wx(self.canvas)
- self.toolbar.Realize()
-
- # On Windows, default frame size behaviour is incorrect
- # you don't need this under Linux
- tw, th = self.toolbar.GetSizeTuple()
- fw, fh = self.canvas.GetSizeTuple()
- self.toolbar.SetSize(Size(fw, th))
-
- # Create a figure manager to manage things
-
- # Now put all into a sizer
- sizer = BoxSizer(VERTICAL)
- # This way of adding to sizer allows resizing
- sizer.Add(self.canvas, 1, LEFT|TOP|GROW)
- # Best to allow the toolbar to resize!
- sizer.Add(self.toolbar, 0, GROW)
- self.SetSizer(sizer)
- self.Fit()
- EVT_TIMER(self, TIMER_ID, self.onTimer)
-
- def init_plot_data(self):
- # jdh you can add a subplot directly from the fig rather than
- # the fig manager
- a = self.fig.add_axes([0.075,0.1,0.75,0.85])
- cax = self.fig.add_axes([0.85,0.1,0.075,0.85])
- self.x = npy.empty((120,120))
- self.x.flat = npy.arange(120.0)*2*npy.pi/120.0
- self.y = npy.empty((120,120))
- self.y.flat = npy.arange(120.0)*2*npy.pi/100.0
- self.y = npy.transpose(self.y)
- z = npy.sin(self.x) + npy.cos(self.y)
- self.im = a.imshow( z, cmap=cm.jet)#, interpolation='nearest')
- self.fig.colorbar(self.im,cax=cax,orientation='vertical')
-
- def GetToolBar(self):
- # You will need to override GetToolBar if you are using an
- # unmanaged toolbar in your frame
- return self.toolbar
-
- def onTimer(self, evt):
- self.x += npy.pi/15
- self.y += npy.pi/20
- z = npy.sin(self.x) + npy.cos(self.y)
- self.im.set_array(z)
- self.canvas.draw()
- #self.canvas.gui_repaint() # jdh wxagg_draw calls this already
-
- def onEraseBackground(self, evt):
- # this is supposed to prevent redraw flicker on some X servers...
- pass
-
- if __name__ == '__main__':
- app = PySimpleApp()
- frame = PlotFigure()
- frame.init_plot_data()
-
- # Initialise the timer - wxPython requires this to be connected to
- # the receiving event handler
- t = Timer(frame, TIMER_ID)
- t.Start(200)
-
- frame.Show()
- app.MainLoop()
-
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/gtk_timeout.txt b/_sources/examples/animation/gtk_timeout.txt
deleted file mode 100644
index 5cbc875fe08..00000000000
--- a/_sources/examples/animation/gtk_timeout.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-.. _animation-gtk_timeout:
-
-animation example code: gtk_timeout.py
-======================================
-
-[`source code `_]
-
-::
-
- import gobject
- import numpy as np
- import matplotlib
- matplotlib.use('GTKAgg')
-
- import matplotlib.pyplot as plt
-
- fig = plt.figure()
- ax = fig.add_subplot(111)
- line, = ax.plot(np.random.rand(10))
- ax.set_ylim(0, 1)
-
- def update():
- line.set_ydata(np.random.rand(10))
- fig.canvas.draw_idle()
- return True # return False to terminate the updates
-
- gobject.timeout_add(100, update) # you can also use idle_add to update when gtk is idle
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/histogram.rst.txt b/_sources/examples/animation/histogram.rst.txt
deleted file mode 100644
index d68e24591b0..00000000000
--- a/_sources/examples/animation/histogram.rst.txt
+++ /dev/null
@@ -1,81 +0,0 @@
-.. _animation-histogram:
-
-animation example code: histogram.py
-====================================
-
-[`source code `_]
-
-::
-
- """
- ==================
- Animated histogram
- ==================
-
- This example shows how to use a path patch to draw a bunch of
- rectangles for an animated histogram.
-
- """
- import numpy as np
-
- import matplotlib.pyplot as plt
- import matplotlib.patches as patches
- import matplotlib.path as path
- import matplotlib.animation as animation
-
- fig, ax = plt.subplots()
-
- # histogram our data with numpy
- data = np.random.randn(1000)
- n, bins = np.histogram(data, 100)
-
- # get the corners of the rectangles for the histogram
- left = np.array(bins[:-1])
- right = np.array(bins[1:])
- bottom = np.zeros(len(left))
- top = bottom + n
- nrects = len(left)
-
- # here comes the tricky part -- we have to set up the vertex and path
- # codes arrays using moveto, lineto and closepoly
-
- # for each rect: 1 for the MOVETO, 3 for the LINETO, 1 for the
- # CLOSEPOLY; the vert for the closepoly is ignored but we still need
- # it to keep the codes aligned with the vertices
- nverts = nrects*(1 + 3 + 1)
- verts = np.zeros((nverts, 2))
- codes = np.ones(nverts, int) * path.Path.LINETO
- codes[0::5] = path.Path.MOVETO
- codes[4::5] = path.Path.CLOSEPOLY
- verts[0::5, 0] = left
- verts[0::5, 1] = bottom
- verts[1::5, 0] = left
- verts[1::5, 1] = top
- verts[2::5, 0] = right
- verts[2::5, 1] = top
- verts[3::5, 0] = right
- verts[3::5, 1] = bottom
-
- barpath = path.Path(verts, codes)
- patch = patches.PathPatch(
- barpath, facecolor='green', edgecolor='yellow', alpha=0.5)
- ax.add_patch(patch)
-
- ax.set_xlim(left[0], right[-1])
- ax.set_ylim(bottom.min(), top.max())
-
-
- def animate(i):
- # simulate new data coming in
- data = np.random.randn(1000)
- n, bins = np.histogram(data, 100)
- top = bottom + n
- verts[1::5, 1] = top
- verts[2::5, 1] = top
- return [patch, ]
-
- ani = animation.FuncAnimation(fig, animate, 100, repeat=False, blit=True)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/histogram.txt b/_sources/examples/animation/histogram.txt
deleted file mode 100644
index eca00dbb10f..00000000000
--- a/_sources/examples/animation/histogram.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-.. _animation-histogram:
-
-animation example code: histogram.py
-====================================
-
-[`source code `_]
-
-::
-
- """
- This example shows how to use a path patch to draw a bunch of
- rectangles for an animated histogram
- """
- import numpy as np
-
- import matplotlib.pyplot as plt
- import matplotlib.patches as patches
- import matplotlib.path as path
- import matplotlib.animation as animation
-
- fig, ax = plt.subplots()
-
- # histogram our data with numpy
- data = np.random.randn(1000)
- n, bins = np.histogram(data, 100)
-
- # get the corners of the rectangles for the histogram
- left = np.array(bins[:-1])
- right = np.array(bins[1:])
- bottom = np.zeros(len(left))
- top = bottom + n
- nrects = len(left)
-
- # here comes the tricky part -- we have to set up the vertex and path
- # codes arrays using moveto, lineto and closepoly
-
- # for each rect: 1 for the MOVETO, 3 for the LINETO, 1 for the
- # CLOSEPOLY; the vert for the closepoly is ignored but we still need
- # it to keep the codes aligned with the vertices
- nverts = nrects*(1 + 3 + 1)
- verts = np.zeros((nverts, 2))
- codes = np.ones(nverts, int) * path.Path.LINETO
- codes[0::5] = path.Path.MOVETO
- codes[4::5] = path.Path.CLOSEPOLY
- verts[0::5, 0] = left
- verts[0::5, 1] = bottom
- verts[1::5, 0] = left
- verts[1::5, 1] = top
- verts[2::5, 0] = right
- verts[2::5, 1] = top
- verts[3::5, 0] = right
- verts[3::5, 1] = bottom
-
- barpath = path.Path(verts, codes)
- patch = patches.PathPatch(
- barpath, facecolor='green', edgecolor='yellow', alpha=0.5)
- ax.add_patch(patch)
-
- ax.set_xlim(left[0], right[-1])
- ax.set_ylim(bottom.min(), top.max())
-
-
- def animate(i):
- # simulate new data coming in
- data = np.random.randn(1000)
- n, bins = np.histogram(data, 100)
- top = bottom + n
- verts[1::5, 1] = top
- verts[2::5, 1] = top
- return [patch, ]
-
- ani = animation.FuncAnimation(fig, animate, 100, repeat=False, blit=True)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/histogram_tkagg.txt b/_sources/examples/animation/histogram_tkagg.txt
deleted file mode 100644
index c1a740f5da9..00000000000
--- a/_sources/examples/animation/histogram_tkagg.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-.. _animation-histogram_tkagg:
-
-animation example code: histogram_tkagg.py
-==========================================
-
-[`source code `_]
-
-::
-
- """
- This example shows how to use a path patch to draw a bunch of
- rectangles for an animated histogram
- """
- import time
- import numpy as np
- import matplotlib
- matplotlib.use('TkAgg') # do this before importing pylab
-
- import matplotlib.pyplot as plt
- import matplotlib.patches as patches
- import matplotlib.path as path
-
- fig = plt.figure()
- ax = fig.add_subplot(111)
-
- # histogram our data with numpy
- data = np.random.randn(1000)
- n, bins = np.histogram(data, 100)
-
- # get the corners of the rectangles for the histogram
- left = np.array(bins[:-1])
- right = np.array(bins[1:])
- bottom = np.zeros(len(left))
- top = bottom + n
- nrects = len(left)
-
- # here comes the tricky part -- we have to set up the vertex and path
- # codes arrays using moveto, lineto and closepoly
-
- # for each rect: 1 for the MOVETO, 3 for the LINETO, 1 for the
- # CLOSEPOLY; the vert for the closepoly is ignored but we still need
- # it to keep the codes aligned with the vertices
- nverts = nrects*(1+3+1)
- verts = np.zeros((nverts, 2))
- codes = np.ones(nverts, int) * path.Path.LINETO
- codes[0::5] = path.Path.MOVETO
- codes[4::5] = path.Path.CLOSEPOLY
- verts[0::5,0] = left
- verts[0::5,1] = bottom
- verts[1::5,0] = left
- verts[1::5,1] = top
- verts[2::5,0] = right
- verts[2::5,1] = top
- verts[3::5,0] = right
- verts[3::5,1] = bottom
-
- barpath = path.Path(verts, codes)
- patch = patches.PathPatch(barpath, facecolor='green', edgecolor='yellow', alpha=0.5)
- ax.add_patch(patch)
-
- ax.set_xlim(left[0], right[-1])
- ax.set_ylim(bottom.min(), top.max())
-
- def animate():
- if animate.cnt>=100:
- return
-
- animate.cnt += 1
- # simulate new data coming in
- data = np.random.randn(1000)
- n, bins = np.histogram(data, 100)
- top = bottom + n
- verts[1::5,1] = top
- verts[2::5,1] = top
- fig.canvas.draw()
- fig.canvas.manager.window.after(100, animate)
- animate.cnt = 0
- fig.canvas.manager.window.after(100, animate)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/index.rst.txt b/_sources/examples/animation/index.rst.txt
deleted file mode 100644
index 04d73493aa3..00000000000
--- a/_sources/examples/animation/index.rst.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-.. _animation-examples-index:
-
-##############################################
-animation Examples
-##############################################
-
-.. htmlonly::
-
- :Release: |version|
- :Date: |today|
-
-.. toctree::
- :maxdepth: 1
-
- animate_decay
- basic_example
- basic_example_writer
- bayes_update
- double_pendulum_animated
- dynamic_image
- dynamic_image2
- histogram
- moviewriter
- rain
- random_data
- simple_3danim
- simple_anim
- strip_chart_demo
- subplots
- unchained
diff --git a/_sources/examples/animation/index.txt b/_sources/examples/animation/index.txt
deleted file mode 100644
index 04d73493aa3..00000000000
--- a/_sources/examples/animation/index.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-.. _animation-examples-index:
-
-##############################################
-animation Examples
-##############################################
-
-.. htmlonly::
-
- :Release: |version|
- :Date: |today|
-
-.. toctree::
- :maxdepth: 1
-
- animate_decay
- basic_example
- basic_example_writer
- bayes_update
- double_pendulum_animated
- dynamic_image
- dynamic_image2
- histogram
- moviewriter
- rain
- random_data
- simple_3danim
- simple_anim
- strip_chart_demo
- subplots
- unchained
diff --git a/_sources/examples/animation/movie_demo.txt b/_sources/examples/animation/movie_demo.txt
deleted file mode 100644
index 93aa87e2a15..00000000000
--- a/_sources/examples/animation/movie_demo.txt
+++ /dev/null
@@ -1,168 +0,0 @@
-.. _animation-movie_demo:
-
-animation example code: movie_demo.py
-=====================================
-
-[`source code `_]
-
-::
-
- #!/usr/bin/python
- #
- # Josh Lifton 2004
- #
- # Permission is hereby granted to use and abuse this document
- # so long as proper attribution is given.
- #
- # This Python script demonstrates how to use the numarray package
- # to generate and handle large arrays of data and how to use the
- # matplotlib package to generate plots from the data and then save
- # those plots as images. These images are then stitched together
- # by Mencoder to create a movie of the plotted data. This script
- # is for demonstration purposes only and is not intended to be
- # for general use. In particular, you will likely need to modify
- # the script to suit your own needs.
- #
-
- import matplotlib
- matplotlib.use('Agg')
- import matplotlib.pyplot as plt # For plotting graphs.
- import numpy as np
- import subprocess # For issuing commands to the OS.
- import os
- import sys # For determining the Python version.
-
- #
- # Print the version information for the machine, OS,
- # Python interpreter, and matplotlib. The version of
- # Mencoder is printed when it is called.
- #
- print 'Executing on', os.uname()
- print 'Python version', sys.version
- print 'matplotlib version', matplotlib.__version__
-
- not_found_msg = """
- The mencoder command was not found;
- mencoder is used by this script to make an avi file from a set of pngs.
- It is typically not installed by default on linux distros because of
- legal restrictions, but it is widely available.
- """
-
- try:
- subprocess.check_call(['mencoder'])
- except subprocess.CalledProcessError:
- print "mencoder command was found"
- pass # mencoder is found, but returns non-zero exit as expected
- # This is a quick and dirty check; it leaves some spurious output
- # for the user to puzzle over.
- except OSError:
- print not_found_msg
- sys.exit("quitting\n")
-
-
- #
- # First, let's create some data to work with. In this example
- # we'll use a normalized Gaussian waveform whose mean and
- # standard deviation both increase linearly with time. Such a
- # waveform can be thought of as a propagating system that loses
- # coherence over time, as might happen to the probability
- # distribution of a clock subjected to independent, identically
- # distributed Gaussian noise at each time step.
- #
-
- print 'Initializing data set...' # Let the user know what's happening.
-
- # Initialize variables needed to create and store the example data set.
- numberOfTimeSteps = 100 # Number of frames we want in the movie.
- x = np.arange(-10,10,0.01) # Values to be plotted on the x-axis.
- mean = -6 # Initial mean of the Gaussian.
- stddev = 0.2 # Initial standard deviation.
- meaninc = 0.1 # Mean increment.
- stddevinc = 0.1 # Standard deviation increment.
-
- # Create an array of zeros and fill it with the example data.
- y = np.zeros((numberOfTimeSteps,len(x)), float)
- for i in range(numberOfTimeSteps) :
- y[i] = (1/np.sqrt(2*np.pi*stddev))*np.exp(-((x-mean)**2)/(2*stddev))
- mean = mean + meaninc
- stddev = stddev + stddevinc
-
- print 'Done.' # Let the user know what's happening.
-
- #
- # Now that we have an example data set (x,y) to work with, we can
- # start graphing it and saving the images.
- #
-
- for i in range(len(y)) :
- #
- # The next four lines are just like MATLAB.
- #
- plt.plot(x,y[i],'b.')
- plt.axis((x[0],x[-1],-0.25,1))
- plt.xlabel('time (ms)')
- plt.ylabel('probability density function')
-
- #
- # Notice the use of LaTeX-like markup.
- #
- plt.title(r'$\cal{N}(\mu, \sigma^2)$', fontsize=20)
-
- #
- # The file name indicates how the image will be saved and the
- # order it will appear in the movie. If you actually wanted each
- # graph to be displayed on the screen, you would include commands
- # such as show() and draw() here. See the matplotlib
- # documentation for details. In this case, we are saving the
- # images directly to a file without displaying them.
- #
- filename = str('%03d' % i) + '.png'
- plt.savefig(filename, dpi=100)
-
- #
- # Let the user know what's happening.
- #
- print 'Wrote file', filename
-
- #
- # Clear the figure to make way for the next image.
- #
- plt.clf()
-
- #
- # Now that we have graphed images of the dataset, we will stitch them
- # together using Mencoder to create a movie. Each image will become
- # a single frame in the movie.
- #
- # We want to use Python to make what would normally be a command line
- # call to Mencoder. Specifically, the command line call we want to
- # emulate is (without the initial '#'):
- # mencoder mf://*.png -mf type=png:w=800:h=600:fps=25 -ovc lavc -lavcopts vcodec=mpeg4 -oac copy -o output.avi
- # See the MPlayer and Mencoder documentation for details.
- #
-
- command = ('mencoder',
- 'mf://*.png',
- '-mf',
- 'type=png:w=800:h=600:fps=25',
- '-ovc',
- 'lavc',
- '-lavcopts',
- 'vcodec=mpeg4',
- '-oac',
- 'copy',
- '-o',
- 'output.avi')
-
- #os.spawnvp(os.P_WAIT, 'mencoder', command)
-
- print "\n\nabout to execute:\n%s\n\n" % ' '.join(command)
- subprocess.check_call(command)
-
- print "\n\n The movie was written to 'output.avi'"
-
- print "\n\n You may want to delete *.png now.\n\n"
-
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/moviewriter.rst.txt b/_sources/examples/animation/moviewriter.rst.txt
deleted file mode 100644
index 52b0e44257f..00000000000
--- a/_sources/examples/animation/moviewriter.rst.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-.. _animation-moviewriter:
-
-animation example code: moviewriter.py
-======================================
-
-[`source code `_]
-
-::
-
- """
- ===========
- MovieWriter
- ===========
-
- This example uses a MovieWriter directly to grab individual frames and write
- them to a file. This avoids any event loop integration, but has the advantage
- of working with even the Agg backend. This is not recommended for use in an
- interactive setting.
-
- """
- # -*- noplot -*-
-
- import numpy as np
- import matplotlib
- matplotlib.use("Agg")
- import matplotlib.pyplot as plt
- import matplotlib.animation as manimation
-
- FFMpegWriter = manimation.writers['ffmpeg']
- metadata = dict(title='Movie Test', artist='Matplotlib',
- comment='Movie support!')
- writer = FFMpegWriter(fps=15, metadata=metadata)
-
- fig = plt.figure()
- l, = plt.plot([], [], 'k-o')
-
- plt.xlim(-5, 5)
- plt.ylim(-5, 5)
-
- x0, y0 = 0, 0
-
- with writer.saving(fig, "writer_test.mp4", 100):
- for i in range(100):
- x0 += 0.1 * np.random.randn()
- y0 += 0.1 * np.random.randn()
- l.set_data(x0, y0)
- writer.grab_frame()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/moviewriter.txt b/_sources/examples/animation/moviewriter.txt
deleted file mode 100644
index 0a03fece516..00000000000
--- a/_sources/examples/animation/moviewriter.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-.. _animation-moviewriter:
-
-animation example code: moviewriter.py
-======================================
-
-[`source code `_]
-
-::
-
- # This example uses a MovieWriter directly to grab individual frames and
- # write them to a file. This avoids any event loop integration, but has
- # the advantage of working with even the Agg backend. This is not recommended
- # for use in an interactive setting.
- # -*- noplot -*-
-
- import numpy as np
- import matplotlib
- matplotlib.use("Agg")
- import matplotlib.pyplot as plt
- import matplotlib.animation as manimation
-
- FFMpegWriter = manimation.writers['ffmpeg']
- metadata = dict(title='Movie Test', artist='Matplotlib',
- comment='Movie support!')
- writer = FFMpegWriter(fps=15, metadata=metadata)
-
- fig = plt.figure()
- l, = plt.plot([], [], 'k-o')
-
- plt.xlim(-5, 5)
- plt.ylim(-5, 5)
-
- x0, y0 = 0, 0
-
- with writer.saving(fig, "writer_test.mp4", 100):
- for i in range(100):
- x0 += 0.1 * np.random.randn()
- y0 += 0.1 * np.random.randn()
- l.set_data(x0, y0)
- writer.grab_frame()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/rain.rst.txt b/_sources/examples/animation/rain.rst.txt
deleted file mode 100644
index 0315c02c0a6..00000000000
--- a/_sources/examples/animation/rain.rst.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-.. _animation-rain:
-
-animation example code: rain.py
-===============================
-
-[`source code `_]
-
-::
-
- """
- ===============
- Rain simulation
- ===============
-
- Simulates rain drops on a surface by animating the scale and opacity
- of 50 scatter points.
-
- Author: Nicolas P. Rougier
- """
- import numpy as np
- import matplotlib.pyplot as plt
- from matplotlib.animation import FuncAnimation
-
-
- # Create new Figure and an Axes which fills it.
- fig = plt.figure(figsize=(7, 7))
- ax = fig.add_axes([0, 0, 1, 1], frameon=False)
- ax.set_xlim(0, 1), ax.set_xticks([])
- ax.set_ylim(0, 1), ax.set_yticks([])
-
- # Create rain data
- n_drops = 50
- rain_drops = np.zeros(n_drops, dtype=[('position', float, 2),
- ('size', float, 1),
- ('growth', float, 1),
- ('color', float, 4)])
-
- # Initialize the raindrops in random positions and with
- # random growth rates.
- rain_drops['position'] = np.random.uniform(0, 1, (n_drops, 2))
- rain_drops['growth'] = np.random.uniform(50, 200, n_drops)
-
- # Construct the scatter which we will update during animation
- # as the raindrops develop.
- scat = ax.scatter(rain_drops['position'][:, 0], rain_drops['position'][:, 1],
- s=rain_drops['size'], lw=0.5, edgecolors=rain_drops['color'],
- facecolors='none')
-
-
- def update(frame_number):
- # Get an index which we can use to re-spawn the oldest raindrop.
- current_index = frame_number % n_drops
-
- # Make all colors more transparent as time progresses.
- rain_drops['color'][:, 3] -= 1.0/len(rain_drops)
- rain_drops['color'][:, 3] = np.clip(rain_drops['color'][:, 3], 0, 1)
-
- # Make all circles bigger.
- rain_drops['size'] += rain_drops['growth']
-
- # Pick a new position for oldest rain drop, resetting its size,
- # color and growth factor.
- rain_drops['position'][current_index] = np.random.uniform(0, 1, 2)
- rain_drops['size'][current_index] = 5
- rain_drops['color'][current_index] = (0, 0, 0, 1)
- rain_drops['growth'][current_index] = np.random.uniform(50, 200)
-
- # Update the scatter collection, with the new colors, sizes and positions.
- scat.set_edgecolors(rain_drops['color'])
- scat.set_sizes(rain_drops['size'])
- scat.set_offsets(rain_drops['position'])
-
-
- # Construct the animation, using the update function as the animation
- # director.
- animation = FuncAnimation(fig, update, interval=10)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/rain.txt b/_sources/examples/animation/rain.txt
deleted file mode 100644
index 69e08b3cd79..00000000000
--- a/_sources/examples/animation/rain.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-.. _animation-rain:
-
-animation example code: rain.py
-===============================
-
-[`source code `_]
-
-::
-
- """
- Rain simulation
-
- Simulates rain drops on a surface by animating the scale and opacity
- of 50 scatter points.
-
- Author: Nicolas P. Rougier
- """
- import numpy as np
- import matplotlib.pyplot as plt
- from matplotlib.animation import FuncAnimation
-
-
- # Create new Figure and an Axes which fills it.
- fig = plt.figure(figsize=(7, 7))
- ax = fig.add_axes([0, 0, 1, 1], frameon=False)
- ax.set_xlim(0, 1), ax.set_xticks([])
- ax.set_ylim(0, 1), ax.set_yticks([])
-
- # Create rain data
- n_drops = 50
- rain_drops = np.zeros(n_drops, dtype=[('position', float, 2),
- ('size', float, 1),
- ('growth', float, 1),
- ('color', float, 4)])
-
- # Initialize the raindrops in random positions and with
- # random growth rates.
- rain_drops['position'] = np.random.uniform(0, 1, (n_drops, 2))
- rain_drops['growth'] = np.random.uniform(50, 200, n_drops)
-
- # Construct the scatter which we will update during animation
- # as the raindrops develop.
- scat = ax.scatter(rain_drops['position'][:, 0], rain_drops['position'][:, 1],
- s=rain_drops['size'], lw=0.5, edgecolors=rain_drops['color'],
- facecolors='none')
-
-
- def update(frame_number):
- # Get an index which we can use to re-spawn the oldest raindrop.
- current_index = frame_number % n_drops
-
- # Make all colors more transparent as time progresses.
- rain_drops['color'][:, 3] -= 1.0/len(rain_drops)
- rain_drops['color'][:, 3] = np.clip(rain_drops['color'][:, 3], 0, 1)
-
- # Make all circles bigger.
- rain_drops['size'] += rain_drops['growth']
-
- # Pick a new position for oldest rain drop, resetting its size,
- # color and growth factor.
- rain_drops['position'][current_index] = np.random.uniform(0, 1, 2)
- rain_drops['size'][current_index] = 5
- rain_drops['color'][current_index] = (0, 0, 0, 1)
- rain_drops['growth'][current_index] = np.random.uniform(50, 200)
-
- # Update the scatter collection, with the new colors, sizes and positions.
- scat.set_edgecolors(rain_drops['color'])
- scat.set_sizes(rain_drops['size'])
- scat.set_offsets(rain_drops['position'])
-
-
- # Construct the animation, using the update function as the animation
- # director.
- animation = FuncAnimation(fig, update, interval=10)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/random_data.rst.txt b/_sources/examples/animation/random_data.rst.txt
deleted file mode 100644
index a61fab6b65d..00000000000
--- a/_sources/examples/animation/random_data.rst.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-.. _animation-random_data:
-
-animation example code: random_data.py
-======================================
-
-[`source code `_]
-
-::
-
- """
- ===========
- Random data
- ===========
-
- An animation of random data.
-
- """
-
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
- fig, ax = plt.subplots()
- line, = ax.plot(np.random.rand(10))
- ax.set_ylim(0, 1)
-
-
- def update(data):
- line.set_ydata(data)
- return line,
-
-
- def data_gen():
- while True:
- yield np.random.rand(10)
-
- ani = animation.FuncAnimation(fig, update, data_gen, interval=100)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/random_data.txt b/_sources/examples/animation/random_data.txt
deleted file mode 100644
index a76fccc8b79..00000000000
--- a/_sources/examples/animation/random_data.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-.. _animation-random_data:
-
-animation example code: random_data.py
-======================================
-
-[`source code `_]
-
-::
-
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
- fig, ax = plt.subplots()
- line, = ax.plot(np.random.rand(10))
- ax.set_ylim(0, 1)
-
-
- def update(data):
- line.set_ydata(data)
- return line,
-
-
- def data_gen():
- while True:
- yield np.random.rand(10)
-
- ani = animation.FuncAnimation(fig, update, data_gen, interval=100)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/simple_3danim.rst.txt b/_sources/examples/animation/simple_3danim.rst.txt
deleted file mode 100644
index 3ce754f58d6..00000000000
--- a/_sources/examples/animation/simple_3danim.rst.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-.. _animation-simple_3danim:
-
-animation example code: simple_3danim.py
-========================================
-
-[`source code `_]
-
-::
-
- """
- ============
- 3D animation
- ============
-
- A simple example of an animated plot... In 3D!
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import mpl_toolkits.mplot3d.axes3d as p3
- import matplotlib.animation as animation
-
-
- def Gen_RandLine(length, dims=2):
- """
- Create a line using a random walk algorithm
-
- length is the number of points for the line.
- dims is the number of dimensions the line has.
- """
- lineData = np.empty((dims, length))
- lineData[:, 0] = np.random.rand(dims)
- for index in range(1, length):
- # scaling the random numbers by 0.1 so
- # movement is small compared to position.
- # subtraction by 0.5 is to change the range to [-0.5, 0.5]
- # to allow a line to move backwards.
- step = ((np.random.rand(dims) - 0.5) * 0.1)
- lineData[:, index] = lineData[:, index - 1] + step
-
- return lineData
-
-
- def update_lines(num, dataLines, lines):
- for line, data in zip(lines, dataLines):
- # NOTE: there is no .set_data() for 3 dim data...
- line.set_data(data[0:2, :num])
- line.set_3d_properties(data[2, :num])
- return lines
-
- # Attaching 3D axis to the figure
- fig = plt.figure()
- ax = p3.Axes3D(fig)
-
- # Fifty lines of random 3-D lines
- data = [Gen_RandLine(25, 3) for index in range(50)]
-
- # Creating fifty line objects.
- # NOTE: Can't pass empty arrays into 3d version of plot()
- lines = [ax.plot(dat[0, 0:1], dat[1, 0:1], dat[2, 0:1])[0] for dat in data]
-
- # Setting the axes properties
- ax.set_xlim3d([0.0, 1.0])
- ax.set_xlabel('X')
-
- ax.set_ylim3d([0.0, 1.0])
- ax.set_ylabel('Y')
-
- ax.set_zlim3d([0.0, 1.0])
- ax.set_zlabel('Z')
-
- ax.set_title('3D Test')
-
- # Creating the Animation object
- line_ani = animation.FuncAnimation(fig, update_lines, 25, fargs=(data, lines),
- interval=50, blit=False)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/simple_3danim.txt b/_sources/examples/animation/simple_3danim.txt
deleted file mode 100644
index 77b6d462592..00000000000
--- a/_sources/examples/animation/simple_3danim.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-.. _animation-simple_3danim:
-
-animation example code: simple_3danim.py
-========================================
-
-[`source code `_]
-
-::
-
- """
- A simple example of an animated plot... In 3D!
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import mpl_toolkits.mplot3d.axes3d as p3
- import matplotlib.animation as animation
-
-
- def Gen_RandLine(length, dims=2):
- """
- Create a line using a random walk algorithm
-
- length is the number of points for the line.
- dims is the number of dimensions the line has.
- """
- lineData = np.empty((dims, length))
- lineData[:, 0] = np.random.rand(dims)
- for index in range(1, length):
- # scaling the random numbers by 0.1 so
- # movement is small compared to position.
- # subtraction by 0.5 is to change the range to [-0.5, 0.5]
- # to allow a line to move backwards.
- step = ((np.random.rand(dims) - 0.5) * 0.1)
- lineData[:, index] = lineData[:, index - 1] + step
-
- return lineData
-
-
- def update_lines(num, dataLines, lines):
- for line, data in zip(lines, dataLines):
- # NOTE: there is no .set_data() for 3 dim data...
- line.set_data(data[0:2, :num])
- line.set_3d_properties(data[2, :num])
- return lines
-
- # Attaching 3D axis to the figure
- fig = plt.figure()
- ax = p3.Axes3D(fig)
-
- # Fifty lines of random 3-D lines
- data = [Gen_RandLine(25, 3) for index in range(50)]
-
- # Creating fifty line objects.
- # NOTE: Can't pass empty arrays into 3d version of plot()
- lines = [ax.plot(dat[0, 0:1], dat[1, 0:1], dat[2, 0:1])[0] for dat in data]
-
- # Setting the axes properties
- ax.set_xlim3d([0.0, 1.0])
- ax.set_xlabel('X')
-
- ax.set_ylim3d([0.0, 1.0])
- ax.set_ylabel('Y')
-
- ax.set_zlim3d([0.0, 1.0])
- ax.set_zlabel('Z')
-
- ax.set_title('3D Test')
-
- # Creating the Animation object
- line_ani = animation.FuncAnimation(fig, update_lines, 25, fargs=(data, lines),
- interval=50, blit=False)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/simple_anim.rst.txt b/_sources/examples/animation/simple_anim.rst.txt
deleted file mode 100644
index 38b39df3ff7..00000000000
--- a/_sources/examples/animation/simple_anim.rst.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-.. _animation-simple_anim:
-
-animation example code: simple_anim.py
-======================================
-
-[`source code `_]
-
-::
-
- """
- A simple example of an animated plot
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
- fig, ax = plt.subplots()
-
- x = np.arange(0, 2*np.pi, 0.01)
- line, = ax.plot(x, np.sin(x))
-
-
- def animate(i):
- line.set_ydata(np.sin(x + i/10.0)) # update the data
- return line,
-
-
- # Init only required for blitting to give a clean slate.
- def init():
- line.set_ydata(np.ma.array(x, mask=True))
- return line,
-
- ani = animation.FuncAnimation(fig, animate, np.arange(1, 200), init_func=init,
- interval=25, blit=True)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/simple_anim.txt b/_sources/examples/animation/simple_anim.txt
deleted file mode 100644
index 38b39df3ff7..00000000000
--- a/_sources/examples/animation/simple_anim.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-.. _animation-simple_anim:
-
-animation example code: simple_anim.py
-======================================
-
-[`source code `_]
-
-::
-
- """
- A simple example of an animated plot
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
- fig, ax = plt.subplots()
-
- x = np.arange(0, 2*np.pi, 0.01)
- line, = ax.plot(x, np.sin(x))
-
-
- def animate(i):
- line.set_ydata(np.sin(x + i/10.0)) # update the data
- return line,
-
-
- # Init only required for blitting to give a clean slate.
- def init():
- line.set_ydata(np.ma.array(x, mask=True))
- return line,
-
- ani = animation.FuncAnimation(fig, animate, np.arange(1, 200), init_func=init,
- interval=25, blit=True)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/simple_anim_gtk.txt b/_sources/examples/animation/simple_anim_gtk.txt
deleted file mode 100644
index e22b4bbbfe1..00000000000
--- a/_sources/examples/animation/simple_anim_gtk.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-.. _animation-simple_anim_gtk:
-
-animation example code: simple_anim_gtk.py
-==========================================
-
-[`source code `_]
-
-::
-
- """
- A simple example of an animated plot using a gtk backend
- """
- import time
- import numpy as np
- import matplotlib
- matplotlib.use('GTKAgg') # do this before importing pylab
-
- import matplotlib.pyplot as plt
-
- fig = plt.figure()
-
- ax = fig.add_subplot(111)
-
- def animate():
- tstart = time.time() # for profiling
- x = np.arange(0, 2*np.pi, 0.01) # x-array
- line, = ax.plot(x, np.sin(x))
-
- for i in np.arange(1,200):
- line.set_ydata(np.sin(x+i/10.0)) # update the data
- fig.canvas.draw() # redraw the canvas
- print 'FPS:' , 200/(time.time()-tstart)
- raise SystemExit
-
- import gobject
- print 'adding idle'
- gobject.idle_add(animate)
- print 'showing'
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/simple_anim_tkagg.txt b/_sources/examples/animation/simple_anim_tkagg.txt
deleted file mode 100644
index 0b2b3fbf5ed..00000000000
--- a/_sources/examples/animation/simple_anim_tkagg.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-.. _animation-simple_anim_tkagg:
-
-animation example code: simple_anim_tkagg.py
-============================================
-
-[`source code `_]
-
-::
-
- #!/usr/bin/env python
- """
- A simple example of an animated plot in tkagg
- """
- import time
- import numpy as np
- import matplotlib
- matplotlib.use('TkAgg') # do this before importing pylab
-
- import matplotlib.pyplot as plt
- fig = plt.figure()
- ax = fig.add_subplot(111)
-
- def animate():
- tstart = time.time() # for profiling
- x = np.arange(0, 2*np.pi, 0.01) # x-array
- line, = ax.plot(x, np.sin(x))
-
- for i in np.arange(1,200):
- line.set_ydata(np.sin(x+i/10.0)) # update the data
- fig.canvas.draw() # redraw the canvas
- print 'FPS:' , 200/(time.time()-tstart)
-
- win = fig.canvas.manager.window
- fig.canvas.manager.window.after(100, animate)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/simple_idle_wx.txt b/_sources/examples/animation/simple_idle_wx.txt
deleted file mode 100644
index df91e3b7472..00000000000
--- a/_sources/examples/animation/simple_idle_wx.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-.. _animation-simple_idle_wx:
-
-animation example code: simple_idle_wx.py
-=========================================
-
-[`source code `_]
-
-::
-
- """
- A simple example of an animated plot using a wx backend
- """
- import time
- import numpy as np
- import matplotlib
- matplotlib.use('WXAgg') # do this before importing pylab
-
- import matplotlib.pyplot as plt
-
- fig = plt.figure()
-
- ax = fig.add_subplot(111)
- t = np.arange(0, 2*np.pi, 0.1)
- line, = ax.plot(t, np.sin(t))
- dt = 0.05
-
- def update_line(idleevent):
- if update_line.i==200:
- return False
- print 'animate', update_line.i
- line.set_ydata(np.sin(t+update_line.i/10.))
- fig.canvas.draw_idle() # redraw the canvas
- update_line.i += 1
- update_line.i = 0
-
- import wx
- wx.EVT_IDLE(wx.GetApp(), update_line)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/simple_timer_wx.txt b/_sources/examples/animation/simple_timer_wx.txt
deleted file mode 100644
index 8af4a23dff9..00000000000
--- a/_sources/examples/animation/simple_timer_wx.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-.. _animation-simple_timer_wx:
-
-animation example code: simple_timer_wx.py
-==========================================
-
-[`source code `_]
-
-::
-
- """
- A simple example of an animated plot using a wx backend
- """
- import time
- import numpy as np
- import matplotlib
- matplotlib.use('WXAgg') # do this before importing pylab
-
- import matplotlib.pyplot as plt
-
- fig = plt.figure()
-
- ax = fig.add_subplot(111)
- t = np.arange(0, 2*np.pi, 0.1)
- line, = ax.plot(t, np.sin(t))
- dt = 0.05
-
-
- def update_line(event):
- if update_line.i==200:
- return False
- print 'update', update_line.i
- line.set_ydata(np.sin(t+update_line.i/10.))
- fig.canvas.draw() # redraw the canvas
- update_line.i += 1
- update_line.i = 0
-
- import wx
- id = wx.NewId()
- actor = fig.canvas.manager.frame
- timer = wx.Timer(actor, id=id)
- timer.Start(100)
- wx.EVT_TIMER(actor, id, update_line)
- #actor.Bind(wx.EVT_TIMER, update_line, id=id)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/strip_chart_demo.rst.txt b/_sources/examples/animation/strip_chart_demo.rst.txt
deleted file mode 100644
index cba94107a0a..00000000000
--- a/_sources/examples/animation/strip_chart_demo.rst.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-.. _animation-strip_chart_demo:
-
-animation example code: strip_chart_demo.py
-===========================================
-
-[`source code `_]
-
-::
-
- """
- ============
- Oscilloscope
- ============
-
- Emulates an oscilloscope.
- """
- import numpy as np
- from matplotlib.lines import Line2D
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
-
- class Scope(object):
- def __init__(self, ax, maxt=2, dt=0.02):
- self.ax = ax
- self.dt = dt
- self.maxt = maxt
- self.tdata = [0]
- self.ydata = [0]
- self.line = Line2D(self.tdata, self.ydata)
- self.ax.add_line(self.line)
- self.ax.set_ylim(-.1, 1.1)
- self.ax.set_xlim(0, self.maxt)
-
- def update(self, y):
- lastt = self.tdata[-1]
- if lastt > self.tdata[0] + self.maxt: # reset the arrays
- self.tdata = [self.tdata[-1]]
- self.ydata = [self.ydata[-1]]
- self.ax.set_xlim(self.tdata[0], self.tdata[0] + self.maxt)
- self.ax.figure.canvas.draw()
-
- t = self.tdata[-1] + self.dt
- self.tdata.append(t)
- self.ydata.append(y)
- self.line.set_data(self.tdata, self.ydata)
- return self.line,
-
-
- def emitter(p=0.03):
- 'return a random value with probability p, else 0'
- while True:
- v = np.random.rand(1)
- if v > p:
- yield 0.
- else:
- yield np.random.rand(1)
-
- fig, ax = plt.subplots()
- scope = Scope(ax)
-
- # pass a generator in "emitter" to produce data for the update func
- ani = animation.FuncAnimation(fig, scope.update, emitter, interval=10,
- blit=True)
-
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/strip_chart_demo.txt b/_sources/examples/animation/strip_chart_demo.txt
deleted file mode 100644
index beb793cfd77..00000000000
--- a/_sources/examples/animation/strip_chart_demo.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-.. _animation-strip_chart_demo:
-
-animation example code: strip_chart_demo.py
-===========================================
-
-[`source code `_]
-
-::
-
- """
- Emulate an oscilloscope. Requires the animation API introduced in
- matplotlib 1.0 SVN.
- """
- import numpy as np
- from matplotlib.lines import Line2D
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
-
- class Scope(object):
- def __init__(self, ax, maxt=2, dt=0.02):
- self.ax = ax
- self.dt = dt
- self.maxt = maxt
- self.tdata = [0]
- self.ydata = [0]
- self.line = Line2D(self.tdata, self.ydata)
- self.ax.add_line(self.line)
- self.ax.set_ylim(-.1, 1.1)
- self.ax.set_xlim(0, self.maxt)
-
- def update(self, y):
- lastt = self.tdata[-1]
- if lastt > self.tdata[0] + self.maxt: # reset the arrays
- self.tdata = [self.tdata[-1]]
- self.ydata = [self.ydata[-1]]
- self.ax.set_xlim(self.tdata[0], self.tdata[0] + self.maxt)
- self.ax.figure.canvas.draw()
-
- t = self.tdata[-1] + self.dt
- self.tdata.append(t)
- self.ydata.append(y)
- self.line.set_data(self.tdata, self.ydata)
- return self.line,
-
-
- def emitter(p=0.03):
- 'return a random value with probability p, else 0'
- while True:
- v = np.random.rand(1)
- if v > p:
- yield 0.
- else:
- yield np.random.rand(1)
-
- fig, ax = plt.subplots()
- scope = Scope(ax)
-
- # pass a generator in "emitter" to produce data for the update func
- ani = animation.FuncAnimation(fig, scope.update, emitter, interval=10,
- blit=True)
-
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/subplots.rst.txt b/_sources/examples/animation/subplots.rst.txt
deleted file mode 100644
index d887264e064..00000000000
--- a/_sources/examples/animation/subplots.rst.txt
+++ /dev/null
@@ -1,116 +0,0 @@
-.. _animation-subplots:
-
-animation example code: subplots.py
-===================================
-
-[`source code `_]
-
-::
-
- """
- =================
- Animated subplots
- =================
-
- This example uses subclassing, but there is no reason that the proper function
- couldn't be set up and then use FuncAnimation. The code is long, but not
- really complex. The length is due solely to the fact that there are a total of
- 9 lines that need to be changed for the animation as well as 3 subplots that
- need initial set up.
-
- """
-
- import numpy as np
- import matplotlib.pyplot as plt
- from matplotlib.lines import Line2D
- import matplotlib.animation as animation
-
-
- class SubplotAnimation(animation.TimedAnimation):
- def __init__(self):
- fig = plt.figure()
- ax1 = fig.add_subplot(1, 2, 1)
- ax2 = fig.add_subplot(2, 2, 2)
- ax3 = fig.add_subplot(2, 2, 4)
-
- self.t = np.linspace(0, 80, 400)
- self.x = np.cos(2 * np.pi * self.t / 10.)
- self.y = np.sin(2 * np.pi * self.t / 10.)
- self.z = 10 * self.t
-
- ax1.set_xlabel('x')
- ax1.set_ylabel('y')
- self.line1 = Line2D([], [], color='black')
- self.line1a = Line2D([], [], color='red', linewidth=2)
- self.line1e = Line2D(
- [], [], color='red', marker='o', markeredgecolor='r')
- ax1.add_line(self.line1)
- ax1.add_line(self.line1a)
- ax1.add_line(self.line1e)
- ax1.set_xlim(-1, 1)
- ax1.set_ylim(-2, 2)
- ax1.set_aspect('equal', 'datalim')
-
- ax2.set_xlabel('y')
- ax2.set_ylabel('z')
- self.line2 = Line2D([], [], color='black')
- self.line2a = Line2D([], [], color='red', linewidth=2)
- self.line2e = Line2D(
- [], [], color='red', marker='o', markeredgecolor='r')
- ax2.add_line(self.line2)
- ax2.add_line(self.line2a)
- ax2.add_line(self.line2e)
- ax2.set_xlim(-1, 1)
- ax2.set_ylim(0, 800)
-
- ax3.set_xlabel('x')
- ax3.set_ylabel('z')
- self.line3 = Line2D([], [], color='black')
- self.line3a = Line2D([], [], color='red', linewidth=2)
- self.line3e = Line2D(
- [], [], color='red', marker='o', markeredgecolor='r')
- ax3.add_line(self.line3)
- ax3.add_line(self.line3a)
- ax3.add_line(self.line3e)
- ax3.set_xlim(-1, 1)
- ax3.set_ylim(0, 800)
-
- animation.TimedAnimation.__init__(self, fig, interval=50, blit=True)
-
- def _draw_frame(self, framedata):
- i = framedata
- head = i - 1
- head_slice = (self.t > self.t[i] - 1.0) & (self.t < self.t[i])
-
- self.line1.set_data(self.x[:i], self.y[:i])
- self.line1a.set_data(self.x[head_slice], self.y[head_slice])
- self.line1e.set_data(self.x[head], self.y[head])
-
- self.line2.set_data(self.y[:i], self.z[:i])
- self.line2a.set_data(self.y[head_slice], self.z[head_slice])
- self.line2e.set_data(self.y[head], self.z[head])
-
- self.line3.set_data(self.x[:i], self.z[:i])
- self.line3a.set_data(self.x[head_slice], self.z[head_slice])
- self.line3e.set_data(self.x[head], self.z[head])
-
- self._drawn_artists = [self.line1, self.line1a, self.line1e,
- self.line2, self.line2a, self.line2e,
- self.line3, self.line3a, self.line3e]
-
- def new_frame_seq(self):
- return iter(range(self.t.size))
-
- def _init_draw(self):
- lines = [self.line1, self.line1a, self.line1e,
- self.line2, self.line2a, self.line2e,
- self.line3, self.line3a, self.line3e]
- for l in lines:
- l.set_data([], [])
-
- ani = SubplotAnimation()
- # ani.save('test_sub.mp4')
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/subplots.txt b/_sources/examples/animation/subplots.txt
deleted file mode 100644
index c1cebcb967b..00000000000
--- a/_sources/examples/animation/subplots.txt
+++ /dev/null
@@ -1,109 +0,0 @@
-.. _animation-subplots:
-
-animation example code: subplots.py
-===================================
-
-[`source code `_]
-
-::
-
- import numpy as np
- import matplotlib.pyplot as plt
- from matplotlib.lines import Line2D
- import matplotlib.animation as animation
-
-
- # This example uses subclassing, but there is no reason that the proper
- # function couldn't be set up and then use FuncAnimation. The code is long, but
- # not really complex. The length is due solely to the fact that there are a
- # total of 9 lines that need to be changed for the animation as well as 3
- # subplots that need initial set up.
- class SubplotAnimation(animation.TimedAnimation):
- def __init__(self):
- fig = plt.figure()
- ax1 = fig.add_subplot(1, 2, 1)
- ax2 = fig.add_subplot(2, 2, 2)
- ax3 = fig.add_subplot(2, 2, 4)
-
- self.t = np.linspace(0, 80, 400)
- self.x = np.cos(2 * np.pi * self.t / 10.)
- self.y = np.sin(2 * np.pi * self.t / 10.)
- self.z = 10 * self.t
-
- ax1.set_xlabel('x')
- ax1.set_ylabel('y')
- self.line1 = Line2D([], [], color='black')
- self.line1a = Line2D([], [], color='red', linewidth=2)
- self.line1e = Line2D(
- [], [], color='red', marker='o', markeredgecolor='r')
- ax1.add_line(self.line1)
- ax1.add_line(self.line1a)
- ax1.add_line(self.line1e)
- ax1.set_xlim(-1, 1)
- ax1.set_ylim(-2, 2)
- ax1.set_aspect('equal', 'datalim')
-
- ax2.set_xlabel('y')
- ax2.set_ylabel('z')
- self.line2 = Line2D([], [], color='black')
- self.line2a = Line2D([], [], color='red', linewidth=2)
- self.line2e = Line2D(
- [], [], color='red', marker='o', markeredgecolor='r')
- ax2.add_line(self.line2)
- ax2.add_line(self.line2a)
- ax2.add_line(self.line2e)
- ax2.set_xlim(-1, 1)
- ax2.set_ylim(0, 800)
-
- ax3.set_xlabel('x')
- ax3.set_ylabel('z')
- self.line3 = Line2D([], [], color='black')
- self.line3a = Line2D([], [], color='red', linewidth=2)
- self.line3e = Line2D(
- [], [], color='red', marker='o', markeredgecolor='r')
- ax3.add_line(self.line3)
- ax3.add_line(self.line3a)
- ax3.add_line(self.line3e)
- ax3.set_xlim(-1, 1)
- ax3.set_ylim(0, 800)
-
- animation.TimedAnimation.__init__(self, fig, interval=50, blit=True)
-
- def _draw_frame(self, framedata):
- i = framedata
- head = i - 1
- head_len = 10
- head_slice = (self.t > self.t[i] - 1.0) & (self.t < self.t[i])
-
- self.line1.set_data(self.x[:i], self.y[:i])
- self.line1a.set_data(self.x[head_slice], self.y[head_slice])
- self.line1e.set_data(self.x[head], self.y[head])
-
- self.line2.set_data(self.y[:i], self.z[:i])
- self.line2a.set_data(self.y[head_slice], self.z[head_slice])
- self.line2e.set_data(self.y[head], self.z[head])
-
- self.line3.set_data(self.x[:i], self.z[:i])
- self.line3a.set_data(self.x[head_slice], self.z[head_slice])
- self.line3e.set_data(self.x[head], self.z[head])
-
- self._drawn_artists = [self.line1, self.line1a, self.line1e,
- self.line2, self.line2a, self.line2e,
- self.line3, self.line3a, self.line3e]
-
- def new_frame_seq(self):
- return iter(range(self.t.size))
-
- def _init_draw(self):
- lines = [self.line1, self.line1a, self.line1e,
- self.line2, self.line2a, self.line2e,
- self.line3, self.line3a, self.line3e]
- for l in lines:
- l.set_data([], [])
-
- ani = SubplotAnimation()
- #ani.save('test_sub.mp4')
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/unchained.rst.txt b/_sources/examples/animation/unchained.rst.txt
deleted file mode 100644
index 598e7474b05..00000000000
--- a/_sources/examples/animation/unchained.rst.txt
+++ /dev/null
@@ -1,81 +0,0 @@
-.. _animation-unchained:
-
-animation example code: unchained.py
-====================================
-
-[`source code `_]
-
-::
-
- """
- ========================
- MATPLOTLIB **UNCHAINED**
- ========================
-
- Comparative path demonstration of frequency from a fake signal of a pulsar.
- (mostly known because of the cover for Joy Division's Unknown Pleasures)
-
- Author: Nicolas P. Rougier
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
- # Create new Figure with black background
- fig = plt.figure(figsize=(8, 8), facecolor='black')
-
- # Add a subplot with no frame
- ax = plt.subplot(111, frameon=False)
-
- # Generate random data
- data = np.random.uniform(0, 1, (64, 75))
- X = np.linspace(-1, 1, data.shape[-1])
- G = 1.5 * np.exp(-4 * X * X)
-
- # Generate line plots
- lines = []
- for i in range(len(data)):
- # Small reduction of the X extents to get a cheap perspective effect
- xscale = 1 - i / 200.
- # Same for linewidth (thicker strokes on bottom)
- lw = 1.5 - i / 100.0
- line, = ax.plot(xscale * X, i + G * data[i], color="w", lw=lw)
- lines.append(line)
-
- # Set y limit (or first line is cropped because of thickness)
- ax.set_ylim(-1, 70)
-
- # No ticks
- ax.set_xticks([])
- ax.set_yticks([])
-
- # 2 part titles to get different font weights
- ax.text(0.5, 1.0, "MATPLOTLIB ", transform=ax.transAxes,
- ha="right", va="bottom", color="w",
- family="sans-serif", fontweight="light", fontsize=16)
- ax.text(0.5, 1.0, "UNCHAINED", transform=ax.transAxes,
- ha="left", va="bottom", color="w",
- family="sans-serif", fontweight="bold", fontsize=16)
-
-
- def update(*args):
- # Shift all data to the right
- data[:, 1:] = data[:, :-1]
-
- # Fill-in new values
- data[:, 0] = np.random.uniform(0, 1, len(data))
-
- # Update data
- for i in range(len(data)):
- lines[i].set_ydata(i + G * data[i])
-
- # Return modified artists
- return lines
-
- # Construct the animation, using the update function as the animation
- # director.
- anim = animation.FuncAnimation(fig, update, interval=10)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/animation/unchained.txt b/_sources/examples/animation/unchained.txt
deleted file mode 100644
index da9b44726d9..00000000000
--- a/_sources/examples/animation/unchained.txt
+++ /dev/null
@@ -1,77 +0,0 @@
-.. _animation-unchained:
-
-animation example code: unchained.py
-====================================
-
-[`source code `_]
-
-::
-
- """
- Comparative path demonstration of frequency from a fake signal of a pulsar.
- (mostly known because of the cover for Joy Division's Unknown Pleasures)
-
- Author: Nicolas P. Rougier
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
-
- # Create new Figure with black background
- fig = plt.figure(figsize=(8, 8), facecolor='black')
-
- # Add a subplot with no frame
- ax = plt.subplot(111, frameon=False)
-
- # Generate random data
- data = np.random.uniform(0, 1, (64, 75))
- X = np.linspace(-1, 1, data.shape[-1])
- G = 1.5 * np.exp(-4 * X * X)
-
- # Generate line plots
- lines = []
- for i in range(len(data)):
- # Small reduction of the X extents to get a cheap perspective effect
- xscale = 1 - i / 200.
- # Same for linewidth (thicker strokes on bottom)
- lw = 1.5 - i / 100.0
- line, = ax.plot(xscale * X, i + G * data[i], color="w", lw=lw)
- lines.append(line)
-
- # Set y limit (or first line is cropped because of thickness)
- ax.set_ylim(-1, 70)
-
- # No ticks
- ax.set_xticks([])
- ax.set_yticks([])
-
- # 2 part titles to get different font weights
- ax.text(0.5, 1.0, "MATPLOTLIB ", transform=ax.transAxes,
- ha="right", va="bottom", color="w",
- family="sans-serif", fontweight="light", fontsize=16)
- ax.text(0.5, 1.0, "UNCHAINED", transform=ax.transAxes,
- ha="left", va="bottom", color="w",
- family="sans-serif", fontweight="bold", fontsize=16)
-
-
- def update(*args):
- # Shift all data to the right
- data[:, 1:] = data[:, :-1]
-
- # Fill-in new values
- data[:, 0] = np.random.uniform(0, 1, len(data))
-
- # Update data
- for i in range(len(data)):
- lines[i].set_ydata(i + G * data[i])
-
- # Return modified artists
- return lines
-
- # Construct the animation, using the update function as the animation
- # director.
- anim = animation.FuncAnimation(fig, update, interval=10)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/agg_oo.rst.txt b/_sources/examples/api/agg_oo.rst.txt
deleted file mode 100644
index 49511bd4fe7..00000000000
--- a/_sources/examples/api/agg_oo.rst.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-.. _api-agg_oo:
-
-api example code: agg_oo.py
-===========================
-
-[`source code `_]
-
-::
-
- # -*- noplot -*-
- """
- =============================
- The object-oriented interface
- =============================
-
- A pure OO (look Ma, no pylab!) example using the agg backend
- """
- from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
- from matplotlib.figure import Figure
-
- fig = Figure()
- canvas = FigureCanvas(fig)
- ax = fig.add_subplot(111)
- ax.plot([1, 2, 3])
- ax.set_title('hi mom')
- ax.grid(True)
- ax.set_xlabel('time')
- ax.set_ylabel('volts')
- canvas.print_figure('test')
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/agg_oo.txt b/_sources/examples/api/agg_oo.txt
deleted file mode 100644
index 6f18b9e79c2..00000000000
--- a/_sources/examples/api/agg_oo.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-.. _api-agg_oo:
-
-api example code: agg_oo.py
-===========================
-
-[`source code `_]
-
-::
-
- #!/usr/bin/env python
- # -*- noplot -*-
- """
- A pure OO (look Ma, no pylab!) example using the agg backend
- """
- from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
- from matplotlib.figure import Figure
-
- fig = Figure()
- canvas = FigureCanvas(fig)
- ax = fig.add_subplot(111)
- ax.plot([1, 2, 3])
- ax.set_title('hi mom')
- ax.grid(True)
- ax.set_xlabel('time')
- ax.set_ylabel('volts')
- canvas.print_figure('test')
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/artist_demo.txt b/_sources/examples/api/artist_demo.txt
deleted file mode 100644
index 3b2492c8e02..00000000000
--- a/_sources/examples/api/artist_demo.txt
+++ /dev/null
@@ -1,133 +0,0 @@
-.. _api-artist_demo:
-
-api example code: artist_demo.py
-================================
-
-
-
-.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/api/artist_demo.py
-
-::
-
- """
- Show examples of matplotlib artists
- http://matplotlib.org/api/artist_api.html
-
- Several examples of standard matplotlib graphics primitives (artists)
- are drawn using matplotlib API. Full list of artists and the
- documentation is available at
- http://matplotlib.org/api/artist_api.html
-
- Copyright (c) 2010, Bartosz Telenczuk
-
- License: This work is licensed under the BSD. A copy should be
- included with this source code, and is also available at
- http://www.opensource.org/licenses/bsd-license.php
- """
-
-
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib
- from matplotlib.collections import PatchCollection
- import matplotlib.path as mpath
- import matplotlib.patches as mpatches
- import matplotlib.lines as mlines
-
- font = "sans-serif"
- fig = plt.figure(figsize=(5,5))
- ax = plt.axes([0,0,1,1])
-
- # create 3x3 grid to plot the artists
- pos = np.mgrid[0.2:0.8:3j, 0.2:0.8:3j].reshape(2, -1)
-
- patches = []
-
- # add a circle
- art = mpatches.Circle(pos[:,0], 0.1,ec="none")
- patches.append(art)
- plt.text(pos[0,0], pos[1,0]-0.15, "Circle", ha="center",
- family=font, size=14)
-
- # add a rectangle
- art = mpatches.Rectangle(pos[:,1] - np.array([0.025, 0.05]), 0.05, 0.1,
- ec="none")
- patches.append(art)
- plt.text(pos[0,1], pos[1,1]-0.15, "Rectangle", ha="center",
- family=font, size=14)
-
- # add a wedge
- wedge = mpatches.Wedge(pos[:,2], 0.1, 30, 270, ec="none")
- patches.append(wedge)
- plt.text(pos[0,2], pos[1,2]-0.15, "Wedge", ha="center",
- family=font, size=14)
-
- # add a Polygon
- polygon = mpatches.RegularPolygon(pos[:,3], 5, 0.1)
- patches.append(polygon)
- plt.text(pos[0,3], pos[1,3]-0.15, "Polygon", ha="center",
- family=font, size=14)
-
- #add an ellipse
- ellipse = mpatches.Ellipse(pos[:,4], 0.2, 0.1)
- patches.append(ellipse)
- plt.text(pos[0,4], pos[1,4]-0.15, "Ellipse", ha="center",
- family=font, size=14)
-
- #add an arrow
- arrow = mpatches.Arrow(pos[0,5]-0.05, pos[1,5]-0.05, 0.1, 0.1, width=0.1)
- patches.append(arrow)
- plt.text(pos[0,5], pos[1,5]-0.15, "Arrow", ha="center",
- family=font, size=14)
-
- # add a path patch
- Path = mpath.Path
- verts = np.array([
- (0.158, -0.257),
- (0.035, -0.11),
- (-0.175, 0.20),
- (0.0375, 0.20),
- (0.085, 0.115),
- (0.22, 0.32),
- (0.3, 0.005),
- (0.20, -0.05),
- (0.158, -0.257),
- ])
- verts = verts-verts.mean(0)
- codes = [Path.MOVETO,
- Path.CURVE4, Path.CURVE4, Path.CURVE4, Path.LINETO,
- Path.CURVE4, Path.CURVE4, Path.CURVE4, Path.CLOSEPOLY]
-
- path = mpath.Path(verts/2.5+pos[:,6], codes)
- patch = mpatches.PathPatch(path)
- patches.append(patch)
- plt.text(pos[0,6], pos[1,6]-0.15, "PathPatch", ha="center",
- family=font, size=14)
-
- # add a fancy box
- fancybox = mpatches.FancyBboxPatch(
- pos[:,7]-np.array([0.025, 0.05]), 0.05, 0.1,
- boxstyle=mpatches.BoxStyle("Round", pad=0.02))
- patches.append(fancybox)
- plt.text(pos[0,7], pos[1,7]-0.15, "FancyBoxPatch", ha="center",
- family=font, size=14)
-
- # add a line
- x,y = np.array([[-0.06, 0.0, 0.1], [0.05,-0.05, 0.05]])
- line = mlines.Line2D(x+pos[0,8], y+pos[1,8], lw=5.,
- alpha=0.4)
- plt.text(pos[0,8], pos[1,8]-0.15, "Line2D", ha="center",
- family=font, size=14)
-
- colors = 100*np.random.rand(len(patches))
- collection = PatchCollection(patches, cmap=matplotlib.cm.jet, alpha=0.4)
- collection.set_array(np.array(colors))
- ax.add_collection(collection)
- ax.add_line(line)
- ax.set_xticks([])
- ax.set_yticks([])
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/barchart_demo.rst.txt b/_sources/examples/api/barchart_demo.rst.txt
deleted file mode 100644
index 25eb0229d3f..00000000000
--- a/_sources/examples/api/barchart_demo.rst.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-.. _api-barchart_demo:
-
-api example code: barchart_demo.py
-==================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/barchart_demo.py
-
-::
-
- """
- ========
- Barchart
- ========
-
- A bar plot with errorbars and height labels on individual bars
- """
- import numpy as np
- import matplotlib.pyplot as plt
-
- N = 5
- men_means = (20, 35, 30, 35, 27)
- men_std = (2, 3, 4, 1, 2)
-
- ind = np.arange(N) # the x locations for the groups
- width = 0.35 # the width of the bars
-
- fig, ax = plt.subplots()
- rects1 = ax.bar(ind, men_means, width, color='r', yerr=men_std)
-
- women_means = (25, 32, 34, 20, 25)
- women_std = (3, 5, 2, 3, 3)
- rects2 = ax.bar(ind + width, women_means, width, color='y', yerr=women_std)
-
- # add some text for labels, title and axes ticks
- ax.set_ylabel('Scores')
- ax.set_title('Scores by group and gender')
- ax.set_xticks(ind + width / 2)
- ax.set_xticklabels(('G1', 'G2', 'G3', 'G4', 'G5'))
-
- ax.legend((rects1[0], rects2[0]), ('Men', 'Women'))
-
-
- def autolabel(rects):
- """
- Attach a text label above each bar displaying its height
- """
- for rect in rects:
- height = rect.get_height()
- ax.text(rect.get_x() + rect.get_width()/2., 1.05*height,
- '%d' % int(height),
- ha='center', va='bottom')
-
- autolabel(rects1)
- autolabel(rects2)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/barchart_demo.txt b/_sources/examples/api/barchart_demo.txt
deleted file mode 100644
index ed6b8bb1f0c..00000000000
--- a/_sources/examples/api/barchart_demo.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-.. _api-barchart_demo:
-
-api example code: barchart_demo.py
-==================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/barchart_demo.py
-
-::
-
-
- #!/usr/bin/env python
- # a bar plot with errorbars
- import numpy as np
- import matplotlib.pyplot as plt
-
- N = 5
- menMeans = (20, 35, 30, 35, 27)
- menStd = (2, 3, 4, 1, 2)
-
- ind = np.arange(N) # the x locations for the groups
- width = 0.35 # the width of the bars
-
- fig, ax = plt.subplots()
- rects1 = ax.bar(ind, menMeans, width, color='r', yerr=menStd)
-
- womenMeans = (25, 32, 34, 20, 25)
- womenStd = (3, 5, 2, 3, 3)
- rects2 = ax.bar(ind + width, womenMeans, width, color='y', yerr=womenStd)
-
- # add some text for labels, title and axes ticks
- ax.set_ylabel('Scores')
- ax.set_title('Scores by group and gender')
- ax.set_xticks(ind + width)
- ax.set_xticklabels(('G1', 'G2', 'G3', 'G4', 'G5'))
-
- ax.legend((rects1[0], rects2[0]), ('Men', 'Women'))
-
-
- def autolabel(rects):
- # attach some text labels
- for rect in rects:
- height = rect.get_height()
- ax.text(rect.get_x() + rect.get_width()/2., 1.05*height,
- '%d' % int(height),
- ha='center', va='bottom')
-
- autolabel(rects1)
- autolabel(rects2)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/bbox_intersect.rst.txt b/_sources/examples/api/bbox_intersect.rst.txt
deleted file mode 100644
index 9b4ae718eea..00000000000
--- a/_sources/examples/api/bbox_intersect.rst.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-.. _api-bbox_intersect:
-
-api example code: bbox_intersect.py
-===================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/bbox_intersect.py
-
-::
-
- """
- ===========================================
- Changing colors of lines intersecting a box
- ===========================================
-
- The lines intersecting the rectangle are colored in red, while the others
- are left as blue lines. This example showcases the `intersect_bbox` function.
-
- """
-
- import numpy as np
- import matplotlib.pyplot as plt
- from matplotlib.transforms import Bbox
- from matplotlib.path import Path
-
- left, bottom, width, height = (-1, -1, 2, 2)
- rect = plt.Rectangle((left, bottom), width, height, facecolor="#aaaaaa")
-
- fig, ax = plt.subplots()
- ax.add_patch(rect)
-
- bbox = Bbox.from_bounds(left, bottom, width, height)
-
- for i in range(12):
- vertices = (np.random.random((2, 2)) - 0.5) * 6.0
- path = Path(vertices)
- if path.intersects_bbox(bbox):
- color = 'r'
- else:
- color = 'b'
- ax.plot(vertices[:, 0], vertices[:, 1], color=color)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/bbox_intersect.txt b/_sources/examples/api/bbox_intersect.txt
deleted file mode 100644
index 7d3609ad447..00000000000
--- a/_sources/examples/api/bbox_intersect.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-.. _api-bbox_intersect:
-
-api example code: bbox_intersect.py
-===================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/bbox_intersect.py
-
-::
-
- import numpy as np
- import matplotlib.pyplot as plt
- from matplotlib.transforms import Bbox
- from matplotlib.path import Path
-
- rect = plt.Rectangle((-1, -1), 2, 2, facecolor="#aaaaaa")
- plt.gca().add_patch(rect)
- bbox = Bbox.from_bounds(-1, -1, 2, 2)
-
- for i in range(12):
- vertices = (np.random.random((2, 2)) - 0.5) * 6.0
- path = Path(vertices)
- if path.intersects_bbox(bbox):
- color = 'r'
- else:
- color = 'b'
- plt.plot(vertices[:, 0], vertices[:, 1], color=color)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/clippath_demo.txt b/_sources/examples/api/clippath_demo.txt
deleted file mode 100644
index 6995c42d3cb..00000000000
--- a/_sources/examples/api/clippath_demo.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-.. _api-clippath_demo:
-
-api example code: clippath_demo.py
-==================================
-
-
-
-.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/api/clippath_demo.py
-
-::
-
- """
- Clipping to arbitrary patches and paths
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.patches as patches
-
-
- fig = plt.figure()
- ax = fig.add_subplot(111, frameon=False, xticks=[], yticks=[])
-
- im = ax.imshow(np.random.rand(10,10))
-
- patch = patches.Circle((300,300), radius=100)
- im.set_clip_path(patch)
-
- plt.show()
-
-
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/collections_demo.rst.txt b/_sources/examples/api/collections_demo.rst.txt
deleted file mode 100644
index 5f97bdfe273..00000000000
--- a/_sources/examples/api/collections_demo.rst.txt
+++ /dev/null
@@ -1,142 +0,0 @@
-.. _api-collections_demo:
-
-api example code: collections_demo.py
-=====================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/collections_demo.py
-
-::
-
- '''
- =========================================================
- Line, Poly and RegularPoly Collection with autoscaling
- =========================================================
-
- For the first two subplots, we will use spirals. Their
- size will be set in plot units, not data units. Their positions
- will be set in data units by using the "offsets" and "transOffset"
- kwargs of the LineCollection and PolyCollection.
-
- The third subplot will make regular polygons, with the same
- type of scaling and positioning as in the first two.
-
- The last subplot illustrates the use of "offsets=(xo,yo)",
- that is, a single tuple instead of a list of tuples, to generate
- successively offset curves, with the offset given in data
- units. This behavior is available only for the LineCollection.
-
- '''
-
- import matplotlib.pyplot as plt
- from matplotlib import collections, colors, transforms
- import numpy as np
-
- nverts = 50
- npts = 100
-
- # Make some spirals
- r = np.arange(nverts)
- theta = np.linspace(0, 2*np.pi, nverts)
- xx = r * np.sin(theta)
- yy = r * np.cos(theta)
- spiral = list(zip(xx, yy))
-
- # Make some offsets
- rs = np.random.RandomState([12345678])
- xo = rs.randn(npts)
- yo = rs.randn(npts)
- xyo = list(zip(xo, yo))
-
- # Make a list of colors cycling through the default series.
- colors = [colors.to_rgba(c)
- for c in plt.rcParams['axes.prop_cycle'].by_key()['color']]
-
- fig, axes = plt.subplots(2, 2)
- fig.subplots_adjust(top=0.92, left=0.07, right=0.97,
- hspace=0.3, wspace=0.3)
- ((ax1, ax2), (ax3, ax4)) = axes # unpack the axes
-
-
- col = collections.LineCollection([spiral], offsets=xyo,
- transOffset=ax1.transData)
- trans = fig.dpi_scale_trans + transforms.Affine2D().scale(1.0/72.0)
- col.set_transform(trans) # the points to pixels transform
- # Note: the first argument to the collection initializer
- # must be a list of sequences of x,y tuples; we have only
- # one sequence, but we still have to put it in a list.
- ax1.add_collection(col, autolim=True)
- # autolim=True enables autoscaling. For collections with
- # offsets like this, it is neither efficient nor accurate,
- # but it is good enough to generate a plot that you can use
- # as a starting point. If you know beforehand the range of
- # x and y that you want to show, it is better to set them
- # explicitly, leave out the autolim kwarg (or set it to False),
- # and omit the 'ax1.autoscale_view()' call below.
-
- # Make a transform for the line segments such that their size is
- # given in points:
- col.set_color(colors)
-
- ax1.autoscale_view() # See comment above, after ax1.add_collection.
- ax1.set_title('LineCollection using offsets')
-
-
- # The same data as above, but fill the curves.
- col = collections.PolyCollection([spiral], offsets=xyo,
- transOffset=ax2.transData)
- trans = transforms.Affine2D().scale(fig.dpi/72.0)
- col.set_transform(trans) # the points to pixels transform
- ax2.add_collection(col, autolim=True)
- col.set_color(colors)
-
-
- ax2.autoscale_view()
- ax2.set_title('PolyCollection using offsets')
-
- # 7-sided regular polygons
-
- col = collections.RegularPolyCollection(7,
- sizes=np.fabs(xx) * 10.0, offsets=xyo,
- transOffset=ax3.transData)
- trans = transforms.Affine2D().scale(fig.dpi / 72.0)
- col.set_transform(trans) # the points to pixels transform
- ax3.add_collection(col, autolim=True)
- col.set_color(colors)
- ax3.autoscale_view()
- ax3.set_title('RegularPolyCollection using offsets')
-
-
- # Simulate a series of ocean current profiles, successively
- # offset by 0.1 m/s so that they form what is sometimes called
- # a "waterfall" plot or a "stagger" plot.
-
- nverts = 60
- ncurves = 20
- offs = (0.1, 0.0)
-
- yy = np.linspace(0, 2*np.pi, nverts)
- ym = np.amax(yy)
- xx = (0.2 + (ym - yy)/ym)**2 * np.cos(yy - 0.4)*0.5
- segs = []
- for i in range(ncurves):
- xxx = xx + 0.02*rs.randn(nverts)
- curve = list(zip(xxx, yy*100))
- segs.append(curve)
-
- col = collections.LineCollection(segs, offsets=offs)
- ax4.add_collection(col, autolim=True)
- col.set_color(colors)
- ax4.autoscale_view()
- ax4.set_title('Successive data offsets')
- ax4.set_xlabel('Zonal velocity component (m/s)')
- ax4.set_ylabel('Depth (m)')
- # Reverse the y-axis so depth increases downward
- ax4.set_ylim(ax4.get_ylim()[::-1])
-
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/collections_demo.txt b/_sources/examples/api/collections_demo.txt
deleted file mode 100644
index 34bc68ff5be..00000000000
--- a/_sources/examples/api/collections_demo.txt
+++ /dev/null
@@ -1,140 +0,0 @@
-.. _api-collections_demo:
-
-api example code: collections_demo.py
-=====================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/collections_demo.py
-
-::
-
- #!/usr/bin/env python
- '''Demonstration of LineCollection, PolyCollection, and
- RegularPolyCollection with autoscaling.
-
- For the first two subplots, we will use spirals. Their
- size will be set in plot units, not data units. Their positions
- will be set in data units by using the "offsets" and "transOffset"
- kwargs of the LineCollection and PolyCollection.
-
- The third subplot will make regular polygons, with the same
- type of scaling and positioning as in the first two.
-
- The last subplot illustrates the use of "offsets=(xo,yo)",
- that is, a single tuple instead of a list of tuples, to generate
- successively offset curves, with the offset given in data
- units. This behavior is available only for the LineCollection.
-
- '''
-
- import matplotlib.pyplot as plt
- from matplotlib import collections, transforms
- from matplotlib.colors import colorConverter
- import numpy as np
-
- nverts = 50
- npts = 100
-
- # Make some spirals
- r = np.arange(nverts)
- theta = np.linspace(0, 2*np.pi, nverts)
- xx = r * np.sin(theta)
- yy = r * np.cos(theta)
- spiral = list(zip(xx, yy))
-
- # Make some offsets
- rs = np.random.RandomState([12345678])
- xo = rs.randn(npts)
- yo = rs.randn(npts)
- xyo = list(zip(xo, yo))
-
- # Make a list of colors cycling through the rgbcmyk series.
- colors = [colorConverter.to_rgba(c)
- for c in ('r', 'g', 'b', 'c', 'y', 'm', 'k')]
-
- fig, axes = plt.subplots(2, 2)
- ((ax1, ax2), (ax3, ax4)) = axes # unpack the axes
-
-
- col = collections.LineCollection([spiral], offsets=xyo,
- transOffset=ax1.transData)
- trans = fig.dpi_scale_trans + transforms.Affine2D().scale(1.0/72.0)
- col.set_transform(trans) # the points to pixels transform
- # Note: the first argument to the collection initializer
- # must be a list of sequences of x,y tuples; we have only
- # one sequence, but we still have to put it in a list.
- ax1.add_collection(col, autolim=True)
- # autolim=True enables autoscaling. For collections with
- # offsets like this, it is neither efficient nor accurate,
- # but it is good enough to generate a plot that you can use
- # as a starting point. If you know beforehand the range of
- # x and y that you want to show, it is better to set them
- # explicitly, leave out the autolim kwarg (or set it to False),
- # and omit the 'ax1.autoscale_view()' call below.
-
- # Make a transform for the line segments such that their size is
- # given in points:
- col.set_color(colors)
-
- ax1.autoscale_view() # See comment above, after ax1.add_collection.
- ax1.set_title('LineCollection using offsets')
-
-
- # The same data as above, but fill the curves.
- col = collections.PolyCollection([spiral], offsets=xyo,
- transOffset=ax2.transData)
- trans = transforms.Affine2D().scale(fig.dpi/72.0)
- col.set_transform(trans) # the points to pixels transform
- ax2.add_collection(col, autolim=True)
- col.set_color(colors)
-
-
- ax2.autoscale_view()
- ax2.set_title('PolyCollection using offsets')
-
- # 7-sided regular polygons
-
- col = collections.RegularPolyCollection(7,
- sizes=np.fabs(xx) * 10.0, offsets=xyo,
- transOffset=ax3.transData)
- trans = transforms.Affine2D().scale(fig.dpi / 72.0)
- col.set_transform(trans) # the points to pixels transform
- ax3.add_collection(col, autolim=True)
- col.set_color(colors)
- ax3.autoscale_view()
- ax3.set_title('RegularPolyCollection using offsets')
-
-
- # Simulate a series of ocean current profiles, successively
- # offset by 0.1 m/s so that they form what is sometimes called
- # a "waterfall" plot or a "stagger" plot.
-
- nverts = 60
- ncurves = 20
- offs = (0.1, 0.0)
-
- yy = np.linspace(0, 2*np.pi, nverts)
- ym = np.amax(yy)
- xx = (0.2 + (ym - yy)/ym)**2 * np.cos(yy - 0.4)*0.5
- segs = []
- for i in range(ncurves):
- xxx = xx + 0.02*rs.randn(nverts)
- curve = list(zip(xxx, yy*100))
- segs.append(curve)
-
- col = collections.LineCollection(segs, offsets=offs)
- ax4.add_collection(col, autolim=True)
- col.set_color(colors)
- ax4.autoscale_view()
- ax4.set_title('Successive data offsets')
- ax4.set_xlabel('Zonal velocity component (m/s)')
- ax4.set_ylabel('Depth (m)')
- # Reverse the y-axis so depth increases downward
- ax4.set_ylim(ax4.get_ylim()[::-1])
-
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/color_cycle.txt b/_sources/examples/api/color_cycle.txt
deleted file mode 100644
index 26ab1463af1..00000000000
--- a/_sources/examples/api/color_cycle.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-.. _api-color_cycle:
-
-api example code: color_cycle.py
-================================
-
-
-
-.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/api/color_cycle.py
-
-::
-
- """
- Illustrate the API for changing the cycle of colors used
- when plotting multiple lines on a single Axes.
- """
-
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib as mpl
-
- yy = np.arange(24)
- yy.shape = 6,4
-
- mpl.rc('lines', linewidth=4)
-
- fig = plt.figure()
- mpl.rcParams['axes.color_cycle'] = ['r', 'g', 'b', 'c']
- ax = fig.add_subplot(2,1,1)
- ax.plot(yy)
- ax.set_title('Changed default color cycle to rgbc')
-
- ax = fig.add_subplot(2,1,2)
- ax.set_color_cycle(['c', 'm', 'y', 'k'])
- ax.plot(yy)
- ax.set_title('This axes only, cycle is cmyk')
-
- plt.show()
-
-
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/colorbar_basics.rst.txt b/_sources/examples/api/colorbar_basics.rst.txt
deleted file mode 100644
index c2b7c70022e..00000000000
--- a/_sources/examples/api/colorbar_basics.rst.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-.. _api-colorbar_basics:
-
-api example code: colorbar_basics.py
-====================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/colorbar_basics.py
-
-::
-
- """
- ========
- Colorbar
- ========
-
- This example shows how to use colorbar by specifying the mappable object (here
- the imshow returned object) and the axes to attach the colorbar to.
- """
-
- import numpy as np
- import matplotlib.pyplot as plt
-
- # setup some generic data
- N = 37
- x, y = np.mgrid[:N, :N]
- Z = (np.cos(x*0.2) + np.sin(y*0.3))
-
- # mask out the negative and positve values, respectively
- Zpos = np.ma.masked_less(Z, 0)
- Zneg = np.ma.masked_greater(Z, 0)
-
- fig, (ax1, ax2) = plt.subplots(figsize=(8, 3), ncols=2)
-
- # plot just the positive data and save the
- # color "mappable" object returned by ax1.imshow
- pos = ax1.imshow(Zpos, cmap='Blues', interpolation='none')
-
- # add the colorbar using the figure's method,
- # telling which mappable we're talking about and
- # which axes object it should be near
- fig.colorbar(pos, ax=ax1)
-
- # repeat everything above for the the negative data
- neg = ax2.imshow(Zneg, cmap='Reds_r', interpolation='none')
- fig.colorbar(neg, ax=ax2)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/colorbar_only.rst.txt b/_sources/examples/api/colorbar_only.rst.txt
deleted file mode 100644
index ce7758b0c63..00000000000
--- a/_sources/examples/api/colorbar_only.rst.txt
+++ /dev/null
@@ -1,92 +0,0 @@
-.. _api-colorbar_only:
-
-api example code: colorbar_only.py
-==================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/colorbar_only.py
-
-::
-
- '''
- ====================
- Customized colorbars
- ====================
-
- This example shows how to build colorbars without an attached mappable.
- '''
-
- import matplotlib.pyplot as plt
- import matplotlib as mpl
-
- # Make a figure and axes with dimensions as desired.
- fig = plt.figure(figsize=(8, 3))
- ax1 = fig.add_axes([0.05, 0.80, 0.9, 0.15])
- ax2 = fig.add_axes([0.05, 0.475, 0.9, 0.15])
- ax3 = fig.add_axes([0.05, 0.15, 0.9, 0.15])
-
- # Set the colormap and norm to correspond to the data for which
- # the colorbar will be used.
- cmap = mpl.cm.cool
- norm = mpl.colors.Normalize(vmin=5, vmax=10)
-
- # ColorbarBase derives from ScalarMappable and puts a colorbar
- # in a specified axes, so it has everything needed for a
- # standalone colorbar. There are many more kwargs, but the
- # following gives a basic continuous colorbar with ticks
- # and labels.
- cb1 = mpl.colorbar.ColorbarBase(ax1, cmap=cmap,
- norm=norm,
- orientation='horizontal')
- cb1.set_label('Some Units')
-
- # The second example illustrates the use of a ListedColormap, a
- # BoundaryNorm, and extended ends to show the "over" and "under"
- # value colors.
- cmap = mpl.colors.ListedColormap(['r', 'g', 'b', 'c'])
- cmap.set_over('0.25')
- cmap.set_under('0.75')
-
- # If a ListedColormap is used, the length of the bounds array must be
- # one greater than the length of the color list. The bounds must be
- # monotonically increasing.
- bounds = [1, 2, 4, 7, 8]
- norm = mpl.colors.BoundaryNorm(bounds, cmap.N)
- cb2 = mpl.colorbar.ColorbarBase(ax2, cmap=cmap,
- norm=norm,
- # to use 'extend', you must
- # specify two extra boundaries:
- boundaries=[0] + bounds + [13],
- extend='both',
- ticks=bounds, # optional
- spacing='proportional',
- orientation='horizontal')
- cb2.set_label('Discrete intervals, some other units')
-
- # The third example illustrates the use of custom length colorbar
- # extensions, used on a colorbar with discrete intervals.
- cmap = mpl.colors.ListedColormap([[0., .4, 1.], [0., .8, 1.],
- [1., .8, 0.], [1., .4, 0.]])
- cmap.set_over((1., 0., 0.))
- cmap.set_under((0., 0., 1.))
-
- bounds = [-1., -.5, 0., .5, 1.]
- norm = mpl.colors.BoundaryNorm(bounds, cmap.N)
- cb3 = mpl.colorbar.ColorbarBase(ax3, cmap=cmap,
- norm=norm,
- boundaries=[-10] + bounds + [10],
- extend='both',
- # Make the length of each extension
- # the same as the length of the
- # interior colors:
- extendfrac='auto',
- ticks=bounds,
- spacing='uniform',
- orientation='horizontal')
- cb3.set_label('Custom extension lengths, some other units')
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/colorbar_only.txt b/_sources/examples/api/colorbar_only.txt
deleted file mode 100644
index ed4b78f9e32..00000000000
--- a/_sources/examples/api/colorbar_only.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-.. _api-colorbar_only:
-
-api example code: colorbar_only.py
-==================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/colorbar_only.py
-
-::
-
- '''
- Make a colorbar as a separate figure.
- '''
-
- from matplotlib import pyplot
- import matplotlib as mpl
-
- # Make a figure and axes with dimensions as desired.
- fig = pyplot.figure(figsize=(8, 3))
- ax1 = fig.add_axes([0.05, 0.80, 0.9, 0.15])
- ax2 = fig.add_axes([0.05, 0.475, 0.9, 0.15])
- ax3 = fig.add_axes([0.05, 0.15, 0.9, 0.15])
-
- # Set the colormap and norm to correspond to the data for which
- # the colorbar will be used.
- cmap = mpl.cm.cool
- norm = mpl.colors.Normalize(vmin=5, vmax=10)
-
- # ColorbarBase derives from ScalarMappable and puts a colorbar
- # in a specified axes, so it has everything needed for a
- # standalone colorbar. There are many more kwargs, but the
- # following gives a basic continuous colorbar with ticks
- # and labels.
- cb1 = mpl.colorbar.ColorbarBase(ax1, cmap=cmap,
- norm=norm,
- orientation='horizontal')
- cb1.set_label('Some Units')
-
- # The second example illustrates the use of a ListedColormap, a
- # BoundaryNorm, and extended ends to show the "over" and "under"
- # value colors.
- cmap = mpl.colors.ListedColormap(['r', 'g', 'b', 'c'])
- cmap.set_over('0.25')
- cmap.set_under('0.75')
-
- # If a ListedColormap is used, the length of the bounds array must be
- # one greater than the length of the color list. The bounds must be
- # monotonically increasing.
- bounds = [1, 2, 4, 7, 8]
- norm = mpl.colors.BoundaryNorm(bounds, cmap.N)
- cb2 = mpl.colorbar.ColorbarBase(ax2, cmap=cmap,
- norm=norm,
- # to use 'extend', you must
- # specify two extra boundaries:
- boundaries=[0] + bounds + [13],
- extend='both',
- ticks=bounds, # optional
- spacing='proportional',
- orientation='horizontal')
- cb2.set_label('Discrete intervals, some other units')
-
- # The third example illustrates the use of custom length colorbar
- # extensions, used on a colorbar with discrete intervals.
- cmap = mpl.colors.ListedColormap([[0., .4, 1.], [0., .8, 1.],
- [1., .8, 0.], [1., .4, 0.]])
- cmap.set_over((1., 0., 0.))
- cmap.set_under((0., 0., 1.))
-
- bounds = [-1., -.5, 0., .5, 1.]
- norm = mpl.colors.BoundaryNorm(bounds, cmap.N)
- cb3 = mpl.colorbar.ColorbarBase(ax3, cmap=cmap,
- norm=norm,
- boundaries=[-10] + bounds + [10],
- extend='both',
- # Make the length of each extension
- # the same as the length of the
- # interior colors:
- extendfrac='auto',
- ticks=bounds,
- spacing='uniform',
- orientation='horizontal')
- cb3.set_label('Custom extension lengths, some other units')
-
- pyplot.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/compound_path.rst.txt b/_sources/examples/api/compound_path.rst.txt
deleted file mode 100644
index ef7f5bf1583..00000000000
--- a/_sources/examples/api/compound_path.rst.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-.. _api-compound_path:
-
-api example code: compound_path.py
-==================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/compound_path.py
-
-::
-
- """
- =============
- Compound path
- =============
-
- Make a compound path -- in this case two simple polygons, a rectangle
- and a triangle. Use CLOSEPOLY and MOVETO for the different parts of
- the compound path
- """
- import numpy as np
- from matplotlib.path import Path
- from matplotlib.patches import PathPatch
- import matplotlib.pyplot as plt
-
-
- vertices = []
- codes = []
-
- codes = [Path.MOVETO] + [Path.LINETO]*3 + [Path.CLOSEPOLY]
- vertices = [(1, 1), (1, 2), (2, 2), (2, 1), (0, 0)]
-
- codes += [Path.MOVETO] + [Path.LINETO]*2 + [Path.CLOSEPOLY]
- vertices += [(4, 4), (5, 5), (5, 4), (0, 0)]
-
- vertices = np.array(vertices, float)
- path = Path(vertices, codes)
-
- pathpatch = PathPatch(path, facecolor='None', edgecolor='green')
-
- fig, ax = plt.subplots()
- ax.add_patch(pathpatch)
- ax.set_title('A compound path')
-
- ax.dataLim.update_from_data_xy(vertices)
- ax.autoscale_view()
-
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/compound_path.txt b/_sources/examples/api/compound_path.txt
deleted file mode 100644
index 0a3a6564ce9..00000000000
--- a/_sources/examples/api/compound_path.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-.. _api-compound_path:
-
-api example code: compound_path.py
-==================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/compound_path.py
-
-::
-
- """
- Make a compund path -- in this case two simple polygons, a rectangle
- and a triangle. Use CLOSEOPOLY and MOVETO for the different parts of
- the compound path
- """
- import numpy as np
- from matplotlib.path import Path
- from matplotlib.patches import PathPatch
- import matplotlib.pyplot as plt
-
-
- vertices = []
- codes = []
-
- codes = [Path.MOVETO] + [Path.LINETO]*3 + [Path.CLOSEPOLY]
- vertices = [(1, 1), (1, 2), (2, 2), (2, 1), (0, 0)]
-
- codes += [Path.MOVETO] + [Path.LINETO]*2 + [Path.CLOSEPOLY]
- vertices += [(4, 4), (5, 5), (5, 4), (0, 0)]
-
- vertices = np.array(vertices, float)
- path = Path(vertices, codes)
-
- pathpatch = PathPatch(path, facecolor='None', edgecolor='green')
-
- fig, ax = plt.subplots()
- ax.add_patch(pathpatch)
- ax.set_title('A compound path')
-
- ax.dataLim.update_from_data_xy(vertices)
- ax.autoscale_view()
-
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/custom_projection_example.rst.txt b/_sources/examples/api/custom_projection_example.rst.txt
deleted file mode 100644
index 363054e5a4d..00000000000
--- a/_sources/examples/api/custom_projection_example.rst.txt
+++ /dev/null
@@ -1,491 +0,0 @@
-.. _api-custom_projection_example:
-
-api example code: custom_projection_example.py
-==============================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/custom_projection_example.py
-
-::
-
- """
- =================
- Custom projection
- =================
-
- This example showcases the Hammer projection by alleviating many features of
- matplotlib.
- """
-
-
- from __future__ import unicode_literals
-
- import matplotlib
- from matplotlib.axes import Axes
- from matplotlib.patches import Circle
- from matplotlib.path import Path
- from matplotlib.ticker import NullLocator, Formatter, FixedLocator
- from matplotlib.transforms import Affine2D, BboxTransformTo, Transform
- from matplotlib.projections import register_projection
- import matplotlib.spines as mspines
- import matplotlib.axis as maxis
- import numpy as np
-
- rcParams = matplotlib.rcParams
-
- # This example projection class is rather long, but it is designed to
- # illustrate many features, not all of which will be used every time.
- # It is also common to factor out a lot of these methods into common
- # code used by a number of projections with similar characteristics
- # (see geo.py).
-
-
- class GeoAxes(Axes):
- """
- An abstract base class for geographic projections
- """
- class ThetaFormatter(Formatter):
- """
- Used to format the theta tick labels. Converts the native
- unit of radians into degrees and adds a degree symbol.
- """
- def __init__(self, round_to=1.0):
- self._round_to = round_to
-
- def __call__(self, x, pos=None):
- degrees = (x / np.pi) * 180.0
- degrees = np.round(degrees / self._round_to) * self._round_to
- if rcParams['text.usetex'] and not rcParams['text.latex.unicode']:
- return r"$%0.0f^\circ$" % degrees
- else:
- return "%0.0f\u00b0" % degrees
-
- RESOLUTION = 75
-
- def _init_axis(self):
- self.xaxis = maxis.XAxis(self)
- self.yaxis = maxis.YAxis(self)
- # Do not register xaxis or yaxis with spines -- as done in
- # Axes._init_axis() -- until GeoAxes.xaxis.cla() works.
- # self.spines['geo'].register_axis(self.yaxis)
- self._update_transScale()
-
- def cla(self):
- Axes.cla(self)
-
- self.set_longitude_grid(30)
- self.set_latitude_grid(15)
- self.set_longitude_grid_ends(75)
- self.xaxis.set_minor_locator(NullLocator())
- self.yaxis.set_minor_locator(NullLocator())
- self.xaxis.set_ticks_position('none')
- self.yaxis.set_ticks_position('none')
- self.yaxis.set_tick_params(label1On=True)
- # Why do we need to turn on yaxis tick labels, but
- # xaxis tick labels are already on?
-
- self.grid(rcParams['axes.grid'])
-
- Axes.set_xlim(self, -np.pi, np.pi)
- Axes.set_ylim(self, -np.pi / 2.0, np.pi / 2.0)
-
- def _set_lim_and_transforms(self):
- # A (possibly non-linear) projection on the (already scaled) data
-
- # There are three important coordinate spaces going on here:
- #
- # 1. Data space: The space of the data itself
- #
- # 2. Axes space: The unit rectangle (0, 0) to (1, 1)
- # covering the entire plot area.
- #
- # 3. Display space: The coordinates of the resulting image,
- # often in pixels or dpi/inch.
-
- # This function makes heavy use of the Transform classes in
- # ``lib/matplotlib/transforms.py.`` For more information, see
- # the inline documentation there.
-
- # The goal of the first two transformations is to get from the
- # data space (in this case longitude and latitude) to axes
- # space. It is separated into a non-affine and affine part so
- # that the non-affine part does not have to be recomputed when
- # a simple affine change to the figure has been made (such as
- # resizing the window or changing the dpi).
-
- # 1) The core transformation from data space into
- # rectilinear space defined in the HammerTransform class.
- self.transProjection = self._get_core_transform(self.RESOLUTION)
-
- # 2) The above has an output range that is not in the unit
- # rectangle, so scale and translate it so it fits correctly
- # within the axes. The peculiar calculations of xscale and
- # yscale are specific to a Aitoff-Hammer projection, so don't
- # worry about them too much.
- self.transAffine = self._get_affine_transform()
-
- # 3) This is the transformation from axes space to display
- # space.
- self.transAxes = BboxTransformTo(self.bbox)
-
- # Now put these 3 transforms together -- from data all the way
- # to display coordinates. Using the '+' operator, these
- # transforms will be applied "in order". The transforms are
- # automatically simplified, if possible, by the underlying
- # transformation framework.
- self.transData = \
- self.transProjection + \
- self.transAffine + \
- self.transAxes
-
- # The main data transformation is set up. Now deal with
- # gridlines and tick labels.
-
- # Longitude gridlines and ticklabels. The input to these
- # transforms are in display space in x and axes space in y.
- # Therefore, the input values will be in range (-xmin, 0),
- # (xmax, 1). The goal of these transforms is to go from that
- # space to display space. The tick labels will be offset 4
- # pixels from the equator.
- self._xaxis_pretransform = \
- Affine2D() \
- .scale(1.0, self._longitude_cap * 2.0) \
- .translate(0.0, -self._longitude_cap)
- self._xaxis_transform = \
- self._xaxis_pretransform + \
- self.transData
- self._xaxis_text1_transform = \
- Affine2D().scale(1.0, 0.0) + \
- self.transData + \
- Affine2D().translate(0.0, 4.0)
- self._xaxis_text2_transform = \
- Affine2D().scale(1.0, 0.0) + \
- self.transData + \
- Affine2D().translate(0.0, -4.0)
-
- # Now set up the transforms for the latitude ticks. The input to
- # these transforms are in axes space in x and display space in
- # y. Therefore, the input values will be in range (0, -ymin),
- # (1, ymax). The goal of these transforms is to go from that
- # space to display space. The tick labels will be offset 4
- # pixels from the edge of the axes ellipse.
- yaxis_stretch = Affine2D().scale(np.pi*2, 1).translate(-np.pi, 0)
- yaxis_space = Affine2D().scale(1.0, 1.1)
- self._yaxis_transform = \
- yaxis_stretch + \
- self.transData
- yaxis_text_base = \
- yaxis_stretch + \
- self.transProjection + \
- (yaxis_space +
- self.transAffine +
- self.transAxes)
- self._yaxis_text1_transform = \
- yaxis_text_base + \
- Affine2D().translate(-8.0, 0.0)
- self._yaxis_text2_transform = \
- yaxis_text_base + \
- Affine2D().translate(8.0, 0.0)
-
- def _get_affine_transform(self):
- transform = self._get_core_transform(1)
- xscale, _ = transform.transform_point((np.pi, 0))
- _, yscale = transform.transform_point((0, np.pi / 2.0))
- return Affine2D() \
- .scale(0.5 / xscale, 0.5 / yscale) \
- .translate(0.5, 0.5)
-
- def get_xaxis_transform(self, which='grid'):
- """
- Override this method to provide a transformation for the
- x-axis tick labels.
-
- Returns a tuple of the form (transform, valign, halign)
- """
- if which not in ['tick1', 'tick2', 'grid']:
- msg = "'which' must be on of [ 'tick1' | 'tick2' | 'grid' ]"
- raise ValueError(msg)
- return self._xaxis_transform
-
- def get_xaxis_text1_transform(self, pad):
- return self._xaxis_text1_transform, 'bottom', 'center'
-
- def get_xaxis_text2_transform(self, pad):
- """
- Override this method to provide a transformation for the
- secondary x-axis tick labels.
-
- Returns a tuple of the form (transform, valign, halign)
- """
- return self._xaxis_text2_transform, 'top', 'center'
-
- def get_yaxis_transform(self, which='grid'):
- """
- Override this method to provide a transformation for the
- y-axis grid and ticks.
- """
- if which not in ['tick1', 'tick2', 'grid']:
- msg = "'which' must be one of [ 'tick1' | 'tick2' | 'grid' ]"
- raise ValueError(msg)
- return self._yaxis_transform
-
- def get_yaxis_text1_transform(self, pad):
- """
- Override this method to provide a transformation for the
- y-axis tick labels.
-
- Returns a tuple of the form (transform, valign, halign)
- """
- return self._yaxis_text1_transform, 'center', 'right'
-
- def get_yaxis_text2_transform(self, pad):
- """
- Override this method to provide a transformation for the
- secondary y-axis tick labels.
-
- Returns a tuple of the form (transform, valign, halign)
- """
- return self._yaxis_text2_transform, 'center', 'left'
-
- def _gen_axes_patch(self):
- """
- Override this method to define the shape that is used for the
- background of the plot. It should be a subclass of Patch.
-
- In this case, it is a Circle (that may be warped by the axes
- transform into an ellipse). Any data and gridlines will be
- clipped to this shape.
- """
- return Circle((0.5, 0.5), 0.5)
-
- def _gen_axes_spines(self):
- return {'geo': mspines.Spine.circular_spine(self, (0.5, 0.5), 0.5)}
-
- def set_yscale(self, *args, **kwargs):
- if args[0] != 'linear':
- raise NotImplementedError
-
- # Prevent the user from applying scales to one or both of the
- # axes. In this particular case, scaling the axes wouldn't make
- # sense, so we don't allow it.
- set_xscale = set_yscale
-
- # Prevent the user from changing the axes limits. In our case, we
- # want to display the whole sphere all the time, so we override
- # set_xlim and set_ylim to ignore any input. This also applies to
- # interactive panning and zooming in the GUI interfaces.
- def set_xlim(self, *args, **kwargs):
- raise TypeError("It is not possible to change axes limits "
- "for geographic projections. Please consider "
- "using Basemap or Cartopy.")
-
- set_ylim = set_xlim
-
- def format_coord(self, lon, lat):
- """
- Override this method to change how the values are displayed in
- the status bar.
-
- In this case, we want them to be displayed in degrees N/S/E/W.
- """
- lon = lon * (180.0 / np.pi)
- lat = lat * (180.0 / np.pi)
- if lat >= 0.0:
- ns = 'N'
- else:
- ns = 'S'
- if lon >= 0.0:
- ew = 'E'
- else:
- ew = 'W'
- return '%f\u00b0%s, %f\u00b0%s' % (abs(lat), ns, abs(lon), ew)
-
- def set_longitude_grid(self, degrees):
- """
- Set the number of degrees between each longitude grid.
-
- This is an example method that is specific to this projection
- class -- it provides a more convenient interface to set the
- ticking than set_xticks would.
- """
- number = (360.0 / degrees) + 1
- self.xaxis.set_major_locator(
- FixedLocator(
- np.linspace(-np.pi, np.pi, number, True)[1:-1]))
- self.xaxis.set_major_formatter(self.ThetaFormatter(degrees))
-
- def set_latitude_grid(self, degrees):
- """
- Set the number of degrees between each longitude grid.
-
- This is an example method that is specific to this projection
- class -- it provides a more convenient interface than
- set_yticks would.
- """
- number = (180.0 / degrees) + 1
- self.yaxis.set_major_locator(
- FixedLocator(
- np.linspace(-np.pi / 2.0, np.pi / 2.0, number, True)[1:-1]))
- self.yaxis.set_major_formatter(self.ThetaFormatter(degrees))
-
- def set_longitude_grid_ends(self, degrees):
- """
- Set the latitude(s) at which to stop drawing the longitude grids.
-
- Often, in geographic projections, you wouldn't want to draw
- longitude gridlines near the poles. This allows the user to
- specify the degree at which to stop drawing longitude grids.
-
- This is an example method that is specific to this projection
- class -- it provides an interface to something that has no
- analogy in the base Axes class.
- """
- self._longitude_cap = degrees * (np.pi / 180.0)
- self._xaxis_pretransform \
- .clear() \
- .scale(1.0, self._longitude_cap * 2.0) \
- .translate(0.0, -self._longitude_cap)
-
- def get_data_ratio(self):
- """
- Return the aspect ratio of the data itself.
-
- This method should be overridden by any Axes that have a
- fixed data ratio.
- """
- return 1.0
-
- # Interactive panning and zooming is not supported with this projection,
- # so we override all of the following methods to disable it.
- def can_zoom(self):
- """
- Return *True* if this axes supports the zoom box button functionality.
- This axes object does not support interactive zoom box.
- """
- return False
-
- def can_pan(self):
- """
- Return *True* if this axes supports the pan/zoom button functionality.
- This axes object does not support interactive pan/zoom.
- """
- return False
-
- def start_pan(self, x, y, button):
- pass
-
- def end_pan(self):
- pass
-
- def drag_pan(self, button, key, x, y):
- pass
-
-
- class HammerAxes(GeoAxes):
- """
- A custom class for the Aitoff-Hammer projection, an equal-area map
- projection.
-
- https://en.wikipedia.org/wiki/Hammer_projection
- """
-
- # The projection must specify a name. This will be used by the
- # user to select the projection,
- # i.e. ``subplot(111, projection='custom_hammer')``.
- name = 'custom_hammer'
-
- class HammerTransform(Transform):
- """
- The base Hammer transform.
- """
- input_dims = 2
- output_dims = 2
- is_separable = False
-
- def __init__(self, resolution):
- """
- Create a new Hammer transform. Resolution is the number of steps
- to interpolate between each input line segment to approximate its
- path in curved Hammer space.
- """
- Transform.__init__(self)
- self._resolution = resolution
-
- def transform_non_affine(self, ll):
- longitude = ll[:, 0:1]
- latitude = ll[:, 1:2]
-
- # Pre-compute some values
- half_long = longitude / 2.0
- cos_latitude = np.cos(latitude)
- sqrt2 = np.sqrt(2.0)
-
- alpha = np.sqrt(1.0 + cos_latitude * np.cos(half_long))
- x = (2.0 * sqrt2) * (cos_latitude * np.sin(half_long)) / alpha
- y = (sqrt2 * np.sin(latitude)) / alpha
- return np.concatenate((x, y), 1)
- transform_non_affine.__doc__ = Transform.transform_non_affine.__doc__
-
- def transform_path_non_affine(self, path):
- # vertices = path.vertices
- ipath = path.interpolated(self._resolution)
- return Path(self.transform(ipath.vertices), ipath.codes)
- transform_path_non_affine.__doc__ = \
- Transform.transform_path_non_affine.__doc__
-
- def inverted(self):
- return HammerAxes.InvertedHammerTransform(self._resolution)
- inverted.__doc__ = Transform.inverted.__doc__
-
- class InvertedHammerTransform(Transform):
- input_dims = 2
- output_dims = 2
- is_separable = False
-
- def __init__(self, resolution):
- Transform.__init__(self)
- self._resolution = resolution
-
- def transform_non_affine(self, xy):
- x = xy[:, 0:1]
- y = xy[:, 1:2]
-
- quarter_x = 0.25 * x
- half_y = 0.5 * y
- z = np.sqrt(1.0 - quarter_x*quarter_x - half_y*half_y)
- longitude = 2 * np.arctan((z*x) / (2.0 * (2.0*z*z - 1.0)))
- latitude = np.arcsin(y*z)
- return np.concatenate((longitude, latitude), 1)
- transform_non_affine.__doc__ = Transform.transform_non_affine.__doc__
-
- def inverted(self):
- return HammerAxes.HammerTransform(self._resolution)
- inverted.__doc__ = Transform.inverted.__doc__
-
- def __init__(self, *args, **kwargs):
- self._longitude_cap = np.pi / 2.0
- GeoAxes.__init__(self, *args, **kwargs)
- self.set_aspect(0.5, adjustable='box', anchor='C')
- self.cla()
-
- def _get_core_transform(self, resolution):
- return self.HammerTransform(resolution)
-
-
- # Now register the projection with matplotlib so the user can select
- # it.
- register_projection(HammerAxes)
-
-
- if __name__ == '__main__':
- import matplotlib.pyplot as plt
- # Now make a simple example using the custom projection.
- plt.subplot(111, projection="custom_hammer")
- p = plt.plot([-1, 1, 1], [-1, -1, 1], "o-")
- plt.grid(True)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/custom_projection_example.txt b/_sources/examples/api/custom_projection_example.txt
deleted file mode 100644
index 61526e45dcb..00000000000
--- a/_sources/examples/api/custom_projection_example.txt
+++ /dev/null
@@ -1,496 +0,0 @@
-.. _api-custom_projection_example:
-
-api example code: custom_projection_example.py
-==============================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/custom_projection_example.py
-
-::
-
- from __future__ import unicode_literals
-
- import matplotlib
- from matplotlib.axes import Axes
- from matplotlib.patches import Circle
- from matplotlib.path import Path
- from matplotlib.ticker import NullLocator, Formatter, FixedLocator
- from matplotlib.transforms import Affine2D, BboxTransformTo, Transform
- from matplotlib.projections import register_projection
- import matplotlib.spines as mspines
- import matplotlib.axis as maxis
-
- import numpy as np
-
- # This example projection class is rather long, but it is designed to
- # illustrate many features, not all of which will be used every time.
- # It is also common to factor out a lot of these methods into common
- # code used by a number of projections with similar characteristics
- # (see geo.py).
-
-
- class HammerAxes(Axes):
- """
- A custom class for the Aitoff-Hammer projection, an equal-area map
- projection.
-
- http://en.wikipedia.org/wiki/Hammer_projection
- """
- # The projection must specify a name. This will be used be the
- # user to select the projection, i.e. ``subplot(111,
- # projection='custom_hammer')``.
- name = 'custom_hammer'
-
- def __init__(self, *args, **kwargs):
- Axes.__init__(self, *args, **kwargs)
- self.set_aspect(0.5, adjustable='box', anchor='C')
- self.cla()
-
- def _init_axis(self):
- self.xaxis = maxis.XAxis(self)
- self.yaxis = maxis.YAxis(self)
- # Do not register xaxis or yaxis with spines -- as done in
- # Axes._init_axis() -- until HammerAxes.xaxis.cla() works.
- #self.spines['hammer'].register_axis(self.yaxis)
- self._update_transScale()
-
- def cla(self):
- """
- Override to set up some reasonable defaults.
- """
- # Don't forget to call the base class
- Axes.cla(self)
-
- # Set up a default grid spacing
- self.set_longitude_grid(30)
- self.set_latitude_grid(15)
- self.set_longitude_grid_ends(75)
-
- # Turn off minor ticking altogether
- self.xaxis.set_minor_locator(NullLocator())
- self.yaxis.set_minor_locator(NullLocator())
-
- # Do not display ticks -- we only want gridlines and text
- self.xaxis.set_ticks_position('none')
- self.yaxis.set_ticks_position('none')
-
- # The limits on this projection are fixed -- they are not to
- # be changed by the user. This makes the math in the
- # transformation itself easier, and since this is a toy
- # example, the easier, the better.
- Axes.set_xlim(self, -np.pi, np.pi)
- Axes.set_ylim(self, -np.pi / 2.0, np.pi / 2.0)
-
- def _set_lim_and_transforms(self):
- """
- This is called once when the plot is created to set up all the
- transforms for the data, text and grids.
- """
- # There are three important coordinate spaces going on here:
- #
- # 1. Data space: The space of the data itself
- #
- # 2. Axes space: The unit rectangle (0, 0) to (1, 1)
- # covering the entire plot area.
- #
- # 3. Display space: The coordinates of the resulting image,
- # often in pixels or dpi/inch.
-
- # This function makes heavy use of the Transform classes in
- # ``lib/matplotlib/transforms.py.`` For more information, see
- # the inline documentation there.
-
- # The goal of the first two transformations is to get from the
- # data space (in this case longitude and latitude) to axes
- # space. It is separated into a non-affine and affine part so
- # that the non-affine part does not have to be recomputed when
- # a simple affine change to the figure has been made (such as
- # resizing the window or changing the dpi).
-
- # 1) The core transformation from data space into
- # rectilinear space defined in the HammerTransform class.
- self.transProjection = self.HammerTransform()
-
- # 2) The above has an output range that is not in the unit
- # rectangle, so scale and translate it so it fits correctly
- # within the axes. The peculiar calculations of xscale and
- # yscale are specific to a Aitoff-Hammer projection, so don't
- # worry about them too much.
- xscale = 2.0 * np.sqrt(2.0) * np.sin(0.5 * np.pi)
- yscale = np.sqrt(2.0) * np.sin(0.5 * np.pi)
- self.transAffine = Affine2D() \
- .scale(0.5 / xscale, 0.5 / yscale) \
- .translate(0.5, 0.5)
-
- # 3) This is the transformation from axes space to display
- # space.
- self.transAxes = BboxTransformTo(self.bbox)
-
- # Now put these 3 transforms together -- from data all the way
- # to display coordinates. Using the '+' operator, these
- # transforms will be applied "in order". The transforms are
- # automatically simplified, if possible, by the underlying
- # transformation framework.
- self.transData = \
- self.transProjection + \
- self.transAffine + \
- self.transAxes
-
- # The main data transformation is set up. Now deal with
- # gridlines and tick labels.
-
- # Longitude gridlines and ticklabels. The input to these
- # transforms are in display space in x and axes space in y.
- # Therefore, the input values will be in range (-xmin, 0),
- # (xmax, 1). The goal of these transforms is to go from that
- # space to display space. The tick labels will be offset 4
- # pixels from the equator.
- self._xaxis_pretransform = \
- Affine2D() \
- .scale(1.0, np.pi) \
- .translate(0.0, -np.pi)
- self._xaxis_transform = \
- self._xaxis_pretransform + \
- self.transData
- self._xaxis_text1_transform = \
- Affine2D().scale(1.0, 0.0) + \
- self.transData + \
- Affine2D().translate(0.0, 4.0)
- self._xaxis_text2_transform = \
- Affine2D().scale(1.0, 0.0) + \
- self.transData + \
- Affine2D().translate(0.0, -4.0)
-
- # Now set up the transforms for the latitude ticks. The input to
- # these transforms are in axes space in x and display space in
- # y. Therefore, the input values will be in range (0, -ymin),
- # (1, ymax). The goal of these transforms is to go from that
- # space to display space. The tick labels will be offset 4
- # pixels from the edge of the axes ellipse.
- yaxis_stretch = Affine2D().scale(2*np.pi, 1.0).translate(-np.pi, 0.0)
- yaxis_space = Affine2D().scale(1.0, 1.1)
- self._yaxis_transform = \
- yaxis_stretch + \
- self.transData
- yaxis_text_base = \
- yaxis_stretch + \
- self.transProjection + \
- (yaxis_space +
- self.transAffine +
- self.transAxes)
- self._yaxis_text1_transform = \
- yaxis_text_base + \
- Affine2D().translate(-8.0, 0.0)
- self._yaxis_text2_transform = \
- yaxis_text_base + \
- Affine2D().translate(8.0, 0.0)
-
- def get_xaxis_transform(self, which='grid'):
- """
- Override this method to provide a transformation for the
- x-axis grid and ticks.
- """
- assert which in ['tick1', 'tick2', 'grid']
- return self._xaxis_transform
-
- def get_xaxis_text1_transform(self, pixelPad):
- """
- Override this method to provide a transformation for the
- x-axis tick labels.
-
- Returns a tuple of the form (transform, valign, halign)
- """
- return self._xaxis_text1_transform, 'bottom', 'center'
-
- def get_xaxis_text2_transform(self, pixelPad):
- """
- Override this method to provide a transformation for the
- secondary x-axis tick labels.
-
- Returns a tuple of the form (transform, valign, halign)
- """
- return self._xaxis_text2_transform, 'top', 'center'
-
- def get_yaxis_transform(self, which='grid'):
- """
- Override this method to provide a transformation for the
- y-axis grid and ticks.
- """
- assert which in ['tick1', 'tick2', 'grid']
- return self._yaxis_transform
-
- def get_yaxis_text1_transform(self, pixelPad):
- """
- Override this method to provide a transformation for the
- y-axis tick labels.
-
- Returns a tuple of the form (transform, valign, halign)
- """
- return self._yaxis_text1_transform, 'center', 'right'
-
- def get_yaxis_text2_transform(self, pixelPad):
- """
- Override this method to provide a transformation for the
- secondary y-axis tick labels.
-
- Returns a tuple of the form (transform, valign, halign)
- """
- return self._yaxis_text2_transform, 'center', 'left'
-
- def _gen_axes_patch(self):
- """
- Override this method to define the shape that is used for the
- background of the plot. It should be a subclass of Patch.
-
- In this case, it is a Circle (that may be warped by the axes
- transform into an ellipse). Any data and gridlines will be
- clipped to this shape.
- """
- return Circle((0.5, 0.5), 0.5)
-
- def _gen_axes_spines(self):
- return {'custom_hammer': mspines.Spine.circular_spine(self,
- (0.5, 0.5), 0.5)}
-
- # Prevent the user from applying scales to one or both of the
- # axes. In this particular case, scaling the axes wouldn't make
- # sense, so we don't allow it.
- def set_xscale(self, *args, **kwargs):
- if args[0] != 'linear':
- raise NotImplementedError
- Axes.set_xscale(self, *args, **kwargs)
-
- def set_yscale(self, *args, **kwargs):
- if args[0] != 'linear':
- raise NotImplementedError
- Axes.set_yscale(self, *args, **kwargs)
-
- # Prevent the user from changing the axes limits. In our case, we
- # want to display the whole sphere all the time, so we override
- # set_xlim and set_ylim to ignore any input. This also applies to
- # interactive panning and zooming in the GUI interfaces.
- def set_xlim(self, *args, **kwargs):
- Axes.set_xlim(self, -np.pi, np.pi)
- Axes.set_ylim(self, -np.pi / 2.0, np.pi / 2.0)
- set_ylim = set_xlim
-
- def format_coord(self, lon, lat):
- """
- Override this method to change how the values are displayed in
- the status bar.
-
- In this case, we want them to be displayed in degrees N/S/E/W.
- """
- lon = np.degrees(lon)
- lat = np.degrees(lat)
- if lat >= 0.0:
- ns = 'N'
- else:
- ns = 'S'
- if lon >= 0.0:
- ew = 'E'
- else:
- ew = 'W'
- # \u00b0 : degree symbol
- return '%f\u00b0%s, %f\u00b0%s' % (abs(lat), ns, abs(lon), ew)
-
- class DegreeFormatter(Formatter):
- """
- This is a custom formatter that converts the native unit of
- radians into (truncated) degrees and adds a degree symbol.
- """
-
- def __init__(self, round_to=1.0):
- self._round_to = round_to
-
- def __call__(self, x, pos=None):
- degrees = round(np.degrees(x) / self._round_to) * self._round_to
- # \u00b0 : degree symbol
- return "%d\u00b0" % degrees
-
- def set_longitude_grid(self, degrees):
- """
- Set the number of degrees between each longitude grid.
-
- This is an example method that is specific to this projection
- class -- it provides a more convenient interface to set the
- ticking than set_xticks would.
- """
- # Set up a FixedLocator at each of the points, evenly spaced
- # by degrees.
- number = (360.0 / degrees) + 1
- self.xaxis.set_major_locator(
- plt.FixedLocator(
- np.linspace(-np.pi, np.pi, number, True)[1:-1]))
- # Set the formatter to display the tick labels in degrees,
- # rather than radians.
- self.xaxis.set_major_formatter(self.DegreeFormatter(degrees))
-
- def set_latitude_grid(self, degrees):
- """
- Set the number of degrees between each longitude grid.
-
- This is an example method that is specific to this projection
- class -- it provides a more convenient interface than
- set_yticks would.
- """
- # Set up a FixedLocator at each of the points, evenly spaced
- # by degrees.
- number = (180.0 / degrees) + 1
- self.yaxis.set_major_locator(
- FixedLocator(
- np.linspace(-np.pi / 2.0, np.pi / 2.0, number, True)[1:-1]))
- # Set the formatter to display the tick labels in degrees,
- # rather than radians.
- self.yaxis.set_major_formatter(self.DegreeFormatter(degrees))
-
- def set_longitude_grid_ends(self, degrees):
- """
- Set the latitude(s) at which to stop drawing the longitude grids.
-
- Often, in geographic projections, you wouldn't want to draw
- longitude gridlines near the poles. This allows the user to
- specify the degree at which to stop drawing longitude grids.
-
- This is an example method that is specific to this projection
- class -- it provides an interface to something that has no
- analogy in the base Axes class.
- """
- longitude_cap = np.radians(degrees)
- # Change the xaxis gridlines transform so that it draws from
- # -degrees to degrees, rather than -pi to pi.
- self._xaxis_pretransform \
- .clear() \
- .scale(1.0, longitude_cap * 2.0) \
- .translate(0.0, -longitude_cap)
-
- def get_data_ratio(self):
- """
- Return the aspect ratio of the data itself.
-
- This method should be overridden by any Axes that have a
- fixed data ratio.
- """
- return 1.0
-
- # Interactive panning and zooming is not supported with this projection,
- # so we override all of the following methods to disable it.
- def can_zoom(self):
- """
- Return True if this axes support the zoom box
- """
- return False
-
- def start_pan(self, x, y, button):
- pass
-
- def end_pan(self):
- pass
-
- def drag_pan(self, button, key, x, y):
- pass
-
- # Now, the transforms themselves.
-
- class HammerTransform(Transform):
- """
- The base Hammer transform.
- """
- input_dims = 2
- output_dims = 2
- is_separable = False
-
- def transform_non_affine(self, ll):
- """
- Override the transform_non_affine method to implement the custom
- transform.
-
- The input and output are Nx2 numpy arrays.
- """
- longitude = ll[:, 0:1]
- latitude = ll[:, 1:2]
-
- # Pre-compute some values
- half_long = longitude / 2.0
- cos_latitude = np.cos(latitude)
- sqrt2 = np.sqrt(2.0)
-
- alpha = 1.0 + cos_latitude * np.cos(half_long)
- x = (2.0 * sqrt2) * (cos_latitude * np.sin(half_long)) / alpha
- y = (sqrt2 * np.sin(latitude)) / alpha
- return np.concatenate((x, y), 1)
-
- # This is where things get interesting. With this projection,
- # straight lines in data space become curves in display space.
- # This is done by interpolating new values between the input
- # values of the data. Since ``transform`` must not return a
- # differently-sized array, any transform that requires
- # changing the length of the data array must happen within
- # ``transform_path``.
- def transform_path_non_affine(self, path):
- ipath = path.interpolated(path._interpolation_steps)
- return Path(self.transform(ipath.vertices), ipath.codes)
- transform_path_non_affine.__doc__ = \
- Transform.transform_path_non_affine.__doc__
-
- if matplotlib.__version__ < '1.2':
- # Note: For compatibility with matplotlib v1.1 and older, you'll
- # need to explicitly implement a ``transform`` method as well.
- # Otherwise a ``NotImplementedError`` will be raised. This isn't
- # necessary for v1.2 and newer, however.
- transform = transform_non_affine
-
- # Similarly, we need to explicitly override ``transform_path`` if
- # compatibility with older matplotlib versions is needed. With v1.2
- # and newer, only overriding the ``transform_path_non_affine``
- # method is sufficient.
- transform_path = transform_path_non_affine
- transform_path.__doc__ = Transform.transform_path.__doc__
-
- def inverted(self):
- return HammerAxes.InvertedHammerTransform()
- inverted.__doc__ = Transform.inverted.__doc__
-
- class InvertedHammerTransform(Transform):
- input_dims = 2
- output_dims = 2
- is_separable = False
-
- def transform_non_affine(self, xy):
- x = xy[:, 0:1]
- y = xy[:, 1:2]
-
- quarter_x = 0.25 * x
- half_y = 0.5 * y
- z = np.sqrt(1.0 - quarter_x*quarter_x - half_y*half_y)
- longitude = 2*np.arctan((z*x)/(2.0*(2.0*z*z - 1.0)))
- latitude = np.arcsin(y*z)
- return np.concatenate((longitude, latitude), 1)
- transform_non_affine.__doc__ = Transform.transform_non_affine.__doc__
-
- # As before, we need to implement the "transform" method for
- # compatibility with matplotlib v1.1 and older.
- if matplotlib.__version__ < '1.2':
- transform = transform_non_affine
-
- def inverted(self):
- # The inverse of the inverse is the original transform... ;)
- return HammerAxes.HammerTransform()
- inverted.__doc__ = Transform.inverted.__doc__
-
- # Now register the projection with matplotlib so the user can select
- # it.
- register_projection(HammerAxes)
-
- if __name__ == '__main__':
- import matplotlib.pyplot as plt
- # Now make a simple example using the custom projection.
- plt.subplot(111, projection="custom_hammer")
- p = plt.plot([-1, 1, 1], [-1, -1, 1], "o-")
- plt.grid(True)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/custom_scale_example.rst.txt b/_sources/examples/api/custom_scale_example.rst.txt
deleted file mode 100644
index 384edb73a6c..00000000000
--- a/_sources/examples/api/custom_scale_example.rst.txt
+++ /dev/null
@@ -1,200 +0,0 @@
-.. _api-custom_scale_example:
-
-api example code: custom_scale_example.py
-=========================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/custom_scale_example.py
-
-::
-
- """
- ============
- Custom scale
- ============
-
- This example showcases how to create a custom scale, by implementing the
- scaling use for latitude data in a Mercator Projection.
- """
-
-
- from __future__ import unicode_literals
-
- import numpy as np
- from numpy import ma
- from matplotlib import scale as mscale
- from matplotlib import transforms as mtransforms
- from matplotlib.ticker import Formatter, FixedLocator
- from matplotlib import rcParams
-
-
- # BUG: this example fails with any other setting of axisbelow
- rcParams['axes.axisbelow'] = False
-
-
- class MercatorLatitudeScale(mscale.ScaleBase):
- """
- Scales data in range -pi/2 to pi/2 (-90 to 90 degrees) using
- the system used to scale latitudes in a Mercator projection.
-
- The scale function:
- ln(tan(y) + sec(y))
-
- The inverse scale function:
- atan(sinh(y))
-
- Since the Mercator scale tends to infinity at +/- 90 degrees,
- there is user-defined threshold, above and below which nothing
- will be plotted. This defaults to +/- 85 degrees.
-
- source:
- http://en.wikipedia.org/wiki/Mercator_projection
- """
-
- # The scale class must have a member ``name`` that defines the
- # string used to select the scale. For example,
- # ``gca().set_yscale("mercator")`` would be used to select this
- # scale.
- name = 'mercator'
-
- def __init__(self, axis, **kwargs):
- """
- Any keyword arguments passed to ``set_xscale`` and
- ``set_yscale`` will be passed along to the scale's
- constructor.
-
- thresh: The degree above which to crop the data.
- """
- mscale.ScaleBase.__init__(self)
- thresh = kwargs.pop("thresh", np.radians(85))
- if thresh >= np.pi / 2.0:
- raise ValueError("thresh must be less than pi/2")
- self.thresh = thresh
-
- def get_transform(self):
- """
- Override this method to return a new instance that does the
- actual transformation of the data.
-
- The MercatorLatitudeTransform class is defined below as a
- nested class of this one.
- """
- return self.MercatorLatitudeTransform(self.thresh)
-
- def set_default_locators_and_formatters(self, axis):
- """
- Override to set up the locators and formatters to use with the
- scale. This is only required if the scale requires custom
- locators and formatters. Writing custom locators and
- formatters is rather outside the scope of this example, but
- there are many helpful examples in ``ticker.py``.
-
- In our case, the Mercator example uses a fixed locator from
- -90 to 90 degrees and a custom formatter class to put convert
- the radians to degrees and put a degree symbol after the
- value::
- """
- class DegreeFormatter(Formatter):
- def __call__(self, x, pos=None):
- # \u00b0 : degree symbol
- return "%d\u00b0" % (np.degrees(x))
-
- axis.set_major_locator(FixedLocator(
- np.radians(np.arange(-90, 90, 10))))
- axis.set_major_formatter(DegreeFormatter())
- axis.set_minor_formatter(DegreeFormatter())
-
- def limit_range_for_scale(self, vmin, vmax, minpos):
- """
- Override to limit the bounds of the axis to the domain of the
- transform. In the case of Mercator, the bounds should be
- limited to the threshold that was passed in. Unlike the
- autoscaling provided by the tick locators, this range limiting
- will always be adhered to, whether the axis range is set
- manually, determined automatically or changed through panning
- and zooming.
- """
- return max(vmin, -self.thresh), min(vmax, self.thresh)
-
- class MercatorLatitudeTransform(mtransforms.Transform):
- # There are two value members that must be defined.
- # ``input_dims`` and ``output_dims`` specify number of input
- # dimensions and output dimensions to the transformation.
- # These are used by the transformation framework to do some
- # error checking and prevent incompatible transformations from
- # being connected together. When defining transforms for a
- # scale, which are, by definition, separable and have only one
- # dimension, these members should always be set to 1.
- input_dims = 1
- output_dims = 1
- is_separable = True
-
- def __init__(self, thresh):
- mtransforms.Transform.__init__(self)
- self.thresh = thresh
-
- def transform_non_affine(self, a):
- """
- This transform takes an Nx1 ``numpy`` array and returns a
- transformed copy. Since the range of the Mercator scale
- is limited by the user-specified threshold, the input
- array must be masked to contain only valid values.
- ``matplotlib`` will handle masked arrays and remove the
- out-of-range data from the plot. Importantly, the
- ``transform`` method *must* return an array that is the
- same shape as the input array, since these values need to
- remain synchronized with values in the other dimension.
- """
- masked = ma.masked_where((a < -self.thresh) | (a > self.thresh), a)
- if masked.mask.any():
- return ma.log(np.abs(ma.tan(masked) + 1.0 / ma.cos(masked)))
- else:
- return np.log(np.abs(np.tan(a) + 1.0 / np.cos(a)))
-
- def inverted(self):
- """
- Override this method so matplotlib knows how to get the
- inverse transform for this transform.
- """
- return MercatorLatitudeScale.InvertedMercatorLatitudeTransform(
- self.thresh)
-
- class InvertedMercatorLatitudeTransform(mtransforms.Transform):
- input_dims = 1
- output_dims = 1
- is_separable = True
-
- def __init__(self, thresh):
- mtransforms.Transform.__init__(self)
- self.thresh = thresh
-
- def transform_non_affine(self, a):
- return np.arctan(np.sinh(a))
-
- def inverted(self):
- return MercatorLatitudeScale.MercatorLatitudeTransform(self.thresh)
-
- # Now that the Scale class has been defined, it must be registered so
- # that ``matplotlib`` can find it.
- mscale.register_scale(MercatorLatitudeScale)
-
-
- if __name__ == '__main__':
- import matplotlib.pyplot as plt
-
- t = np.arange(-180.0, 180.0, 0.1)
- s = np.radians(t)/2.
-
- plt.plot(t, s, '-', lw=2)
- plt.gca().set_yscale('mercator')
-
- plt.xlabel('Longitude')
- plt.ylabel('Latitude')
- plt.title('Mercator: Projection of the Oppressor')
- plt.grid(True)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/custom_scale_example.txt b/_sources/examples/api/custom_scale_example.txt
deleted file mode 100644
index 036bdc53b5f..00000000000
--- a/_sources/examples/api/custom_scale_example.txt
+++ /dev/null
@@ -1,185 +0,0 @@
-.. _api-custom_scale_example:
-
-api example code: custom_scale_example.py
-=========================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/custom_scale_example.py
-
-::
-
- from __future__ import unicode_literals
-
- import numpy as np
- from numpy import ma
- from matplotlib import scale as mscale
- from matplotlib import transforms as mtransforms
- from matplotlib.ticker import Formatter, FixedLocator
-
-
- class MercatorLatitudeScale(mscale.ScaleBase):
- """
- Scales data in range -pi/2 to pi/2 (-90 to 90 degrees) using
- the system used to scale latitudes in a Mercator projection.
-
- The scale function:
- ln(tan(y) + sec(y))
-
- The inverse scale function:
- atan(sinh(y))
-
- Since the Mercator scale tends to infinity at +/- 90 degrees,
- there is user-defined threshold, above and below which nothing
- will be plotted. This defaults to +/- 85 degrees.
-
- source:
- http://en.wikipedia.org/wiki/Mercator_projection
- """
-
- # The scale class must have a member ``name`` that defines the
- # string used to select the scale. For example,
- # ``gca().set_yscale("mercator")`` would be used to select this
- # scale.
- name = 'mercator'
-
- def __init__(self, axis, **kwargs):
- """
- Any keyword arguments passed to ``set_xscale`` and
- ``set_yscale`` will be passed along to the scale's
- constructor.
-
- thresh: The degree above which to crop the data.
- """
- mscale.ScaleBase.__init__(self)
- thresh = kwargs.pop("thresh", np.radians(85))
- if thresh >= np.pi / 2.0:
- raise ValueError("thresh must be less than pi/2")
- self.thresh = thresh
-
- def get_transform(self):
- """
- Override this method to return a new instance that does the
- actual transformation of the data.
-
- The MercatorLatitudeTransform class is defined below as a
- nested class of this one.
- """
- return self.MercatorLatitudeTransform(self.thresh)
-
- def set_default_locators_and_formatters(self, axis):
- """
- Override to set up the locators and formatters to use with the
- scale. This is only required if the scale requires custom
- locators and formatters. Writing custom locators and
- formatters is rather outside the scope of this example, but
- there are many helpful examples in ``ticker.py``.
-
- In our case, the Mercator example uses a fixed locator from
- -90 to 90 degrees and a custom formatter class to put convert
- the radians to degrees and put a degree symbol after the
- value::
- """
- class DegreeFormatter(Formatter):
- def __call__(self, x, pos=None):
- # \u00b0 : degree symbol
- return "%d\u00b0" % (np.degrees(x))
-
- axis.set_major_locator(FixedLocator(
- np.radians(np.arange(-90, 90, 10))))
- axis.set_major_formatter(DegreeFormatter())
- axis.set_minor_formatter(DegreeFormatter())
-
- def limit_range_for_scale(self, vmin, vmax, minpos):
- """
- Override to limit the bounds of the axis to the domain of the
- transform. In the case of Mercator, the bounds should be
- limited to the threshold that was passed in. Unlike the
- autoscaling provided by the tick locators, this range limiting
- will always be adhered to, whether the axis range is set
- manually, determined automatically or changed through panning
- and zooming.
- """
- return max(vmin, -self.thresh), min(vmax, self.thresh)
-
- class MercatorLatitudeTransform(mtransforms.Transform):
- # There are two value members that must be defined.
- # ``input_dims`` and ``output_dims`` specify number of input
- # dimensions and output dimensions to the transformation.
- # These are used by the transformation framework to do some
- # error checking and prevent incompatible transformations from
- # being connected together. When defining transforms for a
- # scale, which are, by definition, separable and have only one
- # dimension, these members should always be set to 1.
- input_dims = 1
- output_dims = 1
- is_separable = True
-
- def __init__(self, thresh):
- mtransforms.Transform.__init__(self)
- self.thresh = thresh
-
- def transform_non_affine(self, a):
- """
- This transform takes an Nx1 ``numpy`` array and returns a
- transformed copy. Since the range of the Mercator scale
- is limited by the user-specified threshold, the input
- array must be masked to contain only valid values.
- ``matplotlib`` will handle masked arrays and remove the
- out-of-range data from the plot. Importantly, the
- ``transform`` method *must* return an array that is the
- same shape as the input array, since these values need to
- remain synchronized with values in the other dimension.
- """
- masked = ma.masked_where((a < -self.thresh) | (a > self.thresh), a)
- if masked.mask.any():
- return ma.log(np.abs(ma.tan(masked) + 1.0 / ma.cos(masked)))
- else:
- return np.log(np.abs(np.tan(a) + 1.0 / np.cos(a)))
-
- def inverted(self):
- """
- Override this method so matplotlib knows how to get the
- inverse transform for this transform.
- """
- return MercatorLatitudeScale.InvertedMercatorLatitudeTransform(
- self.thresh)
-
- class InvertedMercatorLatitudeTransform(mtransforms.Transform):
- input_dims = 1
- output_dims = 1
- is_separable = True
-
- def __init__(self, thresh):
- mtransforms.Transform.__init__(self)
- self.thresh = thresh
-
- def transform_non_affine(self, a):
- return np.arctan(np.sinh(a))
-
- def inverted(self):
- return MercatorLatitudeScale.MercatorLatitudeTransform(self.thresh)
-
- # Now that the Scale class has been defined, it must be registered so
- # that ``matplotlib`` can find it.
- mscale.register_scale(MercatorLatitudeScale)
-
-
- if __name__ == '__main__':
- import matplotlib.pyplot as plt
-
- t = np.arange(-180.0, 180.0, 0.1)
- s = np.radians(t)/2.
-
- plt.plot(t, s, '-', lw=2)
- plt.gca().set_yscale('mercator')
-
- plt.xlabel('Longitude')
- plt.ylabel('Latitude')
- plt.title('Mercator: Projection of the Oppressor')
- plt.grid(True)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/date_demo.rst.txt b/_sources/examples/api/date_demo.rst.txt
deleted file mode 100644
index 2924c5d635d..00000000000
--- a/_sources/examples/api/date_demo.rst.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-.. _api-date_demo:
-
-api example code: date_demo.py
-==============================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/date_demo.py
-
-::
-
- """
- ================
- Date tick labels
- ================
-
- Show how to make date plots in matplotlib using date tick locators and
- formatters. See major_minor_demo1.py for more information on
- controlling major and minor ticks
-
- All matplotlib date plotting is done by converting date instances into
- days since the 0001-01-01 UTC. The conversion, tick locating and
- formatting is done behind the scenes so this is most transparent to
- you. The dates module provides several converter functions date2num
- and num2date
-
- """
- import datetime
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.dates as mdates
- import matplotlib.cbook as cbook
-
- years = mdates.YearLocator() # every year
- months = mdates.MonthLocator() # every month
- yearsFmt = mdates.DateFormatter('%Y')
-
- # load a numpy record array from yahoo csv data with fields date,
- # open, close, volume, adj_close from the mpl-data/example directory.
- # The record array stores python datetime.date as an object array in
- # the date column
- datafile = cbook.get_sample_data('goog.npy')
- try:
- # Python3 cannot load python2 .npy files with datetime(object) arrays
- # unless the encoding is set to bytes. However this option was
- # not added until numpy 1.10 so this example will only work with
- # python 2 or with numpy 1.10 and later.
- r = np.load(datafile, encoding='bytes').view(np.recarray)
- except TypeError:
- r = np.load(datafile).view(np.recarray)
-
- fig, ax = plt.subplots()
- ax.plot(r.date, r.adj_close)
-
-
- # format the ticks
- ax.xaxis.set_major_locator(years)
- ax.xaxis.set_major_formatter(yearsFmt)
- ax.xaxis.set_minor_locator(months)
-
- datemin = datetime.date(r.date.min().year, 1, 1)
- datemax = datetime.date(r.date.max().year + 1, 1, 1)
- ax.set_xlim(datemin, datemax)
-
-
- # format the coords message box
- def price(x):
- return '$%1.2f' % x
- ax.format_xdata = mdates.DateFormatter('%Y-%m-%d')
- ax.format_ydata = price
- ax.grid(True)
-
- # rotates and right aligns the x labels, and moves the bottom of the
- # axes up to make room for them
- fig.autofmt_xdate()
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/date_demo.txt b/_sources/examples/api/date_demo.txt
deleted file mode 100644
index b08d87e5edc..00000000000
--- a/_sources/examples/api/date_demo.txt
+++ /dev/null
@@ -1,77 +0,0 @@
-.. _api-date_demo:
-
-api example code: date_demo.py
-==============================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/date_demo.py
-
-::
-
- #!/usr/bin/env python
- """
- Show how to make date plots in matplotlib using date tick locators and
- formatters. See major_minor_demo1.py for more information on
- controlling major and minor ticks
-
- All matplotlib date plotting is done by converting date instances into
- days since the 0001-01-01 UTC. The conversion, tick locating and
- formatting is done behind the scenes so this is most transparent to
- you. The dates module provides several converter functions date2num
- and num2date
-
- """
- import datetime
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.dates as mdates
- import matplotlib.cbook as cbook
-
- years = mdates.YearLocator() # every year
- months = mdates.MonthLocator() # every month
- yearsFmt = mdates.DateFormatter('%Y')
-
- # load a numpy record array from yahoo csv data with fields date,
- # open, close, volume, adj_close from the mpl-data/example directory.
- # The record array stores python datetime.date as an object array in
- # the date column
- datafile = cbook.get_sample_data('goog.npy')
- try:
- # Python3 cannot load python2 .npy files with datetime(object) arrays
- # unless the encoding is set to bytes. Hovever this option was
- # not added until numpy 1.10 so this example will only work with
- # python 2 or with numpy 1.10 and later.
- r = np.load(datafile, encoding='bytes').view(np.recarray)
- except TypeError:
- r = np.load(datafile).view(np.recarray)
-
- fig, ax = plt.subplots()
- ax.plot(r.date, r.adj_close)
-
-
- # format the ticks
- ax.xaxis.set_major_locator(years)
- ax.xaxis.set_major_formatter(yearsFmt)
- ax.xaxis.set_minor_locator(months)
-
- datemin = datetime.date(r.date.min().year, 1, 1)
- datemax = datetime.date(r.date.max().year + 1, 1, 1)
- ax.set_xlim(datemin, datemax)
-
-
- # format the coords message box
- def price(x):
- return '$%1.2f' % x
- ax.format_xdata = mdates.DateFormatter('%Y-%m-%d')
- ax.format_ydata = price
- ax.grid(True)
-
- # rotates and right aligns the x labels, and moves the bottom of the
- # axes up to make room for them
- fig.autofmt_xdate()
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/date_index_formatter.rst.txt b/_sources/examples/api/date_index_formatter.rst.txt
deleted file mode 100644
index 7c9faf1d7cb..00000000000
--- a/_sources/examples/api/date_index_formatter.rst.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-.. _api-date_index_formatter:
-
-api example code: date_index_formatter.py
-=========================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/date_index_formatter.py
-
-::
-
- """
- =====================================
- Custom tick formatter for time series
- =====================================
-
- When plotting time series, e.g., financial time series, one often wants
- 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.mlab as mlab
- import matplotlib.cbook as cbook
- import matplotlib.ticker as ticker
-
- datafile = cbook.get_sample_data('aapl.csv', asfileobj=False)
- print('loading %s' % datafile)
- r = mlab.csv2rec(datafile)
-
- r.sort()
- r = r[-30:] # get the last 30 days
-
-
- # first we'll do it the default way, with gaps on weekends
- fig, axes = plt.subplots(ncols=2, figsize=(8, 4))
- ax = axes[0]
- ax.plot(r.date, r.adj_close, 'o-')
- ax.set_title("Default")
- fig.autofmt_xdate()
-
- # next we'll write a custom formatter
- N = len(r)
- ind = np.arange(N) # the evenly spaced plot indices
-
-
- def format_date(x, pos=None):
- thisind = np.clip(int(x + 0.5), 0, N - 1)
- return r.date[thisind].strftime('%Y-%m-%d')
-
- ax = axes[1]
- ax.plot(ind, r.adj_close, 'o-')
- ax.xaxis.set_major_formatter(ticker.FuncFormatter(format_date))
- ax.set_title("Custom tick formatter")
- fig.autofmt_xdate()
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/date_index_formatter.txt b/_sources/examples/api/date_index_formatter.txt
deleted file mode 100644
index 01258edfc73..00000000000
--- a/_sources/examples/api/date_index_formatter.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-.. _api-date_index_formatter:
-
-api example code: date_index_formatter.py
-=========================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/date_index_formatter.py
-
-::
-
- """
- When plotting time series, e.g., financial time series, one often wants
- to leave out days on which there is no data, eh 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.mlab as mlab
- import matplotlib.cbook as cbook
- import matplotlib.ticker as ticker
-
- datafile = cbook.get_sample_data('aapl.csv', asfileobj=False)
- print('loading %s' % datafile)
- r = mlab.csv2rec(datafile)
-
- r.sort()
- r = r[-30:] # get the last 30 days
-
-
- # first we'll do it the default way, with gaps on weekends
- fig, ax = plt.subplots()
- ax.plot(r.date, r.adj_close, 'o-')
- fig.autofmt_xdate()
-
- # next we'll write a custom formatter
- N = len(r)
- ind = np.arange(N) # the evenly spaced plot indices
-
-
- def format_date(x, pos=None):
- thisind = np.clip(int(x + 0.5), 0, N - 1)
- return r.date[thisind].strftime('%Y-%m-%d')
-
- fig, ax = plt.subplots()
- ax.plot(ind, r.adj_close, 'o-')
- ax.xaxis.set_major_formatter(ticker.FuncFormatter(format_date))
- fig.autofmt_xdate()
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/demo_affine_image.rst.txt b/_sources/examples/api/demo_affine_image.rst.txt
deleted file mode 100644
index 7ae11903680..00000000000
--- a/_sources/examples/api/demo_affine_image.rst.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-.. _api-demo_affine_image:
-
-api example code: demo_affine_image.py
-======================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/demo_affine_image.py
-
-::
-
- """
- ============================
- Affine transform of an image
- ============================
-
- For the backends that support draw_image with optional affine
- transform (e.g., agg, ps backend), the image of the output should
- have its boundary match the dashed yellow rectangle.
- """
-
- import numpy as np
- import matplotlib.mlab as mlab
- import matplotlib.pyplot as plt
- import matplotlib.transforms as mtransforms
-
-
- def get_image():
- delta = 0.25
- x = y = np.arange(-3.0, 3.0, delta)
- X, Y = np.meshgrid(x, y)
- Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
- Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
- Z = Z2 - Z1 # difference of Gaussians
- return Z
-
-
- def do_plot(ax, Z, transform):
- im = ax.imshow(Z, interpolation='none',
- origin='lower',
- extent=[-2, 4, -3, 2], clip_on=True)
-
- trans_data = transform + ax.transData
- im.set_transform(trans_data)
-
- # display intended extent of the image
- x1, x2, y1, y2 = im.get_extent()
- ax.plot([x1, x2, x2, x1, x1], [y1, y1, y2, y2, y1], "y--",
- transform=trans_data)
- ax.set_xlim(-5, 5)
- ax.set_ylim(-4, 4)
-
-
- # prepare image and figure
- fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2)
- Z = get_image()
-
- # image rotation
- do_plot(ax1, Z, mtransforms.Affine2D().rotate_deg(30))
-
- # image skew
- do_plot(ax2, Z, mtransforms.Affine2D().skew_deg(30, 15))
-
- # scale and reflection
- do_plot(ax3, Z, mtransforms.Affine2D().scale(-1, .5))
-
- # everything and a translation
- do_plot(ax4, Z, mtransforms.Affine2D().
- rotate_deg(30).skew_deg(30, 15).scale(-1, .5).translate(.5, -1))
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/demo_affine_image.txt b/_sources/examples/api/demo_affine_image.txt
deleted file mode 100644
index da831048110..00000000000
--- a/_sources/examples/api/demo_affine_image.txt
+++ /dev/null
@@ -1,79 +0,0 @@
-.. _api-demo_affine_image:
-
-api example code: demo_affine_image.py
-======================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/demo_affine_image.py
-
-::
-
- #!/usr/bin/env python
-
-
- """
- For the backends that supports draw_image with optional affine
- transform (e.g., agg, ps backend), the image of the output should
- have its boundary matches the red rectangles.
- """
-
- import numpy as np
- import matplotlib.cm as cm
- import matplotlib.mlab as mlab
- import matplotlib.pyplot as plt
- import matplotlib.transforms as mtransforms
-
-
- def get_image():
- delta = 0.25
- x = y = np.arange(-3.0, 3.0, delta)
- X, Y = np.meshgrid(x, y)
- Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
- Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
- Z = Z2 - Z1 # difference of Gaussians
- return Z
-
-
- def imshow_affine(ax, z, *kl, **kwargs):
- im = ax.imshow(z, *kl, **kwargs)
- x1, x2, y1, y2 = im.get_extent()
- im._image_skew_coordinate = (x2, y1)
- return im
-
-
- if 1:
-
- # image rotation
-
- fig, (ax1, ax2) = plt.subplots(1, 2)
- Z = get_image()
- im1 = imshow_affine(ax1, Z, interpolation='none', cmap=cm.jet,
- origin='lower',
- extent=[-2, 4, -3, 2], clip_on=True)
-
- trans_data2 = mtransforms.Affine2D().rotate_deg(30) + ax1.transData
- im1.set_transform(trans_data2)
-
- # display intended extent of the image
- x1, x2, y1, y2 = im1.get_extent()
- x3, y3 = x2, y1
-
- ax1.plot([x1, x2, x2, x1, x1], [y1, y1, y2, y2, y1], "r--", lw=3,
- transform=trans_data2)
-
- ax1.set_xlim(-3, 5)
- ax1.set_ylim(-4, 4)
-
- # image skew
-
- im2 = ax2.imshow(Z, interpolation='none', cmap=cm.jet,
- origin='lower',
- extent=[-2, 4, -3, 2], clip_on=True)
- im2._image_skew_coordinate = (3, -2)
-
- plt.show()
- #plt.savefig("demo_affine_image")
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/donut_demo.rst.txt b/_sources/examples/api/donut_demo.rst.txt
deleted file mode 100644
index 02882754bb9..00000000000
--- a/_sources/examples/api/donut_demo.rst.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-.. _api-donut_demo:
-
-api example code: donut_demo.py
-===============================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/donut_demo.py
-
-::
-
- """
- =============
- Mmh Donuts!!!
- =============
-
- This example draws donuts (miam!) using Path and Patches.
- """
-
- import numpy as np
- import matplotlib.path as mpath
- import matplotlib.patches as mpatches
- import matplotlib.pyplot as plt
-
-
- def wise(v):
- if v == 1:
- return "CCW"
- else:
- return "CW"
-
-
- def make_circle(r):
- t = np.arange(0, np.pi * 2.0, 0.01)
- t = t.reshape((len(t), 1))
- x = r * np.cos(t)
- y = r * np.sin(t)
- return np.hstack((x, y))
-
- Path = mpath.Path
-
- fig, ax = plt.subplots()
-
- inside_vertices = make_circle(0.5)
- outside_vertices = make_circle(1.0)
- codes = np.ones(
- len(inside_vertices), dtype=mpath.Path.code_type) * mpath.Path.LINETO
- codes[0] = mpath.Path.MOVETO
-
- for i, (inside, outside) in enumerate(((1, 1), (1, -1), (-1, 1), (-1, -1))):
- # Concatenate the inside and outside subpaths together, changing their
- # order as needed
- vertices = np.concatenate((outside_vertices[::outside],
- inside_vertices[::inside]))
- # Shift the path
- vertices[:, 0] += i * 2.5
- # The codes will be all "LINETO" commands, except for "MOVETO"s at the
- # beginning of each subpath
- all_codes = np.concatenate((codes, codes))
- # Create the Path object
- path = mpath.Path(vertices, all_codes)
- # Add plot it
- patch = mpatches.PathPatch(path, facecolor='#885500', edgecolor='black')
- ax.add_patch(patch)
-
- ax.annotate("Outside %s,\nInside %s" % (wise(outside), wise(inside)),
- (i * 2.5, -1.5), va="top", ha="center")
-
- ax.set_xlim(-2, 10)
- ax.set_ylim(-3, 2)
- ax.set_title('Mmm, donuts!')
- ax.set_aspect(1.0)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/donut_demo.txt b/_sources/examples/api/donut_demo.txt
deleted file mode 100644
index 189630c753b..00000000000
--- a/_sources/examples/api/donut_demo.txt
+++ /dev/null
@@ -1,68 +0,0 @@
-.. _api-donut_demo:
-
-api example code: donut_demo.py
-===============================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/donut_demo.py
-
-::
-
- import numpy as np
- import matplotlib.path as mpath
- import matplotlib.patches as mpatches
- import matplotlib.pyplot as plt
-
-
- def wise(v):
- if v == 1:
- return "CCW"
- else:
- return "CW"
-
-
- def make_circle(r):
- t = np.arange(0, np.pi * 2.0, 0.01)
- t = t.reshape((len(t), 1))
- x = r * np.cos(t)
- y = r * np.sin(t)
- return np.hstack((x, y))
-
- Path = mpath.Path
-
- fig, ax = plt.subplots()
-
- inside_vertices = make_circle(0.5)
- outside_vertices = make_circle(1.0)
- codes = np.ones(
- len(inside_vertices), dtype=mpath.Path.code_type) * mpath.Path.LINETO
- codes[0] = mpath.Path.MOVETO
-
- for i, (inside, outside) in enumerate(((1, 1), (1, -1), (-1, 1), (-1, -1))):
- # Concatenate the inside and outside subpaths together, changing their
- # order as needed
- vertices = np.concatenate((outside_vertices[::outside],
- inside_vertices[::inside]))
- # Shift the path
- vertices[:, 0] += i * 2.5
- # The codes will be all "LINETO" commands, except for "MOVETO"s at the
- # beginning of each subpath
- all_codes = np.concatenate((codes, codes))
- # Create the Path object
- path = mpath.Path(vertices, all_codes)
- # Add plot it
- patch = mpatches.PathPatch(path, facecolor='#885500', edgecolor='black')
- ax.add_patch(patch)
-
- ax.annotate("Outside %s,\nInside %s" % (wise(outside), wise(inside)),
- (i * 2.5, -1.5), va="top", ha="center")
-
- ax.set_xlim(-2, 10)
- ax.set_ylim(-3, 2)
- ax.set_title('Mmm, donuts!')
- ax.set_aspect(1.0)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/engineering_formatter.rst.txt b/_sources/examples/api/engineering_formatter.rst.txt
deleted file mode 100644
index be374089906..00000000000
--- a/_sources/examples/api/engineering_formatter.rst.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-.. _api-engineering_formatter:
-
-api example code: engineering_formatter.py
-==========================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/engineering_formatter.py
-
-::
-
- '''
- =========================================
- Labeling ticks using engineering notation
- =========================================
-
- Demo to show use of the engineering Formatter.
- '''
-
- import matplotlib.pyplot as plt
- import numpy as np
-
- from matplotlib.ticker import EngFormatter
-
- prng = np.random.RandomState(123)
-
- fig, ax = plt.subplots()
- ax.set_xscale('log')
- formatter = EngFormatter(unit='Hz')
- ax.xaxis.set_major_formatter(formatter)
-
- xs = np.logspace(1, 9, 100)
- ys = (0.8 + 0.4 * prng.uniform(size=100)) * np.log10(xs)**2
- ax.plot(xs, ys)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/engineering_formatter.txt b/_sources/examples/api/engineering_formatter.txt
deleted file mode 100644
index dd1b700530b..00000000000
--- a/_sources/examples/api/engineering_formatter.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-.. _api-engineering_formatter:
-
-api example code: engineering_formatter.py
-==========================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/engineering_formatter.py
-
-::
-
- '''
- Demo to show use of the engineering Formatter.
- '''
-
- import matplotlib.pyplot as plt
- import numpy as np
-
- from matplotlib.ticker import EngFormatter
-
- fig, ax = plt.subplots()
- ax.set_xscale('log')
- formatter = EngFormatter(unit='Hz', places=1)
- ax.xaxis.set_major_formatter(formatter)
-
- xs = np.logspace(1, 9, 100)
- ys = (0.8 + 0.4*np.random.uniform(size=100))*np.log10(xs)**2
- ax.plot(xs, ys)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/fahrenheit_celcius_scales.txt b/_sources/examples/api/fahrenheit_celcius_scales.txt
deleted file mode 100644
index 4dd8e9d57b0..00000000000
--- a/_sources/examples/api/fahrenheit_celcius_scales.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-.. _api-fahrenheit_celcius_scales:
-
-api example code: fahrenheit_celcius_scales.py
-==============================================
-
-
-
-.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/api/fahrenheit_celcius_scales.py
-
-::
-
- """
- Shoiw how to display two scales on the left and right y axis -- Fahrenheit and Celcius
- """
-
- import matplotlib.pyplot as plt
-
- fig = plt.figure()
- ax1 = fig.add_subplot(111) # the Fahrenheit scale
- ax2 = ax1.twinx() # the Celcius scale
-
- def Tc(Tf):
- return (5./9.)*(Tf-32)
-
-
- def update_ax2(ax1):
- y1, y2 = ax1.get_ylim()
- ax2.set_ylim(Tc(y1), Tc(y2))
- ax2.figure.canvas.draw()
-
- # automatically update ylim of ax2 when ylim of ax1 changes.
- ax1.callbacks.connect("ylim_changed", update_ax2)
- ax1.plot([78, 79, 79, 77])
-
- ax1.set_title('Two scales: Fahrenheit and Celcius')
- ax1.set_ylabel('Fahrenheit')
- ax2.set_ylabel('Celcius')
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/fahrenheit_celsius_scales.txt b/_sources/examples/api/fahrenheit_celsius_scales.txt
deleted file mode 100644
index 4809c4b5a9d..00000000000
--- a/_sources/examples/api/fahrenheit_celsius_scales.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-.. _api-fahrenheit_celsius_scales:
-
-api example code: fahrenheit_celsius_scales.py
-==============================================
-
-
-
-.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/api/fahrenheit_celsius_scales.py
-
-::
-
- """
- Show how to display two scales on the left and right y axis -- Fahrenheit and Celsius
- """
-
- import matplotlib.pyplot as plt
-
- fig, ax1 = plt.subplots() # ax1 is the Fahrenheit scale
- ax2 = ax1.twinx() # ax2 is the Celsius scale
-
- def Tc(Tf):
- return (5./9.)*(Tf-32)
-
-
- def update_ax2(ax1):
- y1, y2 = ax1.get_ylim()
- ax2.set_ylim(Tc(y1), Tc(y2))
- ax2.figure.canvas.draw()
-
- # automatically update ylim of ax2 when ylim of ax1 changes.
- ax1.callbacks.connect("ylim_changed", update_ax2)
- ax1.plot([78, 79, 79, 77])
-
- ax1.set_title('Two scales: Fahrenheit and Celsius')
- ax1.set_ylabel('Fahrenheit')
- ax2.set_ylabel('Celsius')
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/filled_step.rst.txt b/_sources/examples/api/filled_step.rst.txt
deleted file mode 100644
index ede459969ea..00000000000
--- a/_sources/examples/api/filled_step.rst.txt
+++ /dev/null
@@ -1,235 +0,0 @@
-.. _api-filled_step:
-
-api example code: filled_step.py
-================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/filled_step.py
-
-::
-
- """
- =========================
- Hatch-filled histograms
- =========================
-
- This example showcases the hatching capabilities of matplotlib by plotting
- various histograms.
- """
-
- import itertools
- from collections import OrderedDict
- from functools import partial
-
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.ticker as mticker
- from cycler import cycler
- from six.moves import zip
-
-
- def filled_hist(ax, edges, values, bottoms=None, orientation='v',
- **kwargs):
- """
- Draw a histogram as a stepped patch.
-
- Extra kwargs are passed through to `fill_between`
-
- Parameters
- ----------
- ax : Axes
- The axes to plot to
-
- edges : array
- A length n+1 array giving the left edges of each bin and the
- right edge of the last bin.
-
- values : array
- A length n array of bin counts or values
-
- bottoms : scalar or array, optional
- A length n array of the bottom of the bars. If None, zero is used.
-
- orientation : {'v', 'h'}
- Orientation of the histogram. 'v' (default) has
- the bars increasing in the positive y-direction.
-
- Returns
- -------
- ret : PolyCollection
- Artist added to the Axes
- """
- print(orientation)
- if orientation not in set('hv'):
- raise ValueError("orientation must be in {{'h', 'v'}} "
- "not {o}".format(o=orientation))
-
- kwargs.setdefault('step', 'post')
- edges = np.asarray(edges)
- values = np.asarray(values)
- if len(edges) - 1 != len(values):
- raise ValueError('Must provide one more bin edge than value not: '
- 'len(edges): {lb} len(values): {lv}'.format(
- lb=len(edges), lv=len(values)))
-
- if bottoms is None:
- bottoms = np.zeros_like(values)
- if np.isscalar(bottoms):
- bottoms = np.ones_like(values) * bottoms
-
- values = np.r_[values, values[-1]]
- bottoms = np.r_[bottoms, bottoms[-1]]
- if orientation == 'h':
- return ax.fill_betweenx(edges, values, bottoms,
- **kwargs)
- elif orientation == 'v':
- return ax.fill_between(edges, values, bottoms,
- **kwargs)
- else:
- raise AssertionError("you should never be here")
-
-
- def stack_hist(ax, stacked_data, sty_cycle, bottoms=None,
- hist_func=None, labels=None,
- plot_func=None, plot_kwargs=None):
- """
- ax : axes.Axes
- The axes to add artists too
-
- stacked_data : array or Mapping
- A (N, M) shaped array. The first dimension will be iterated over to
- compute histograms row-wise
-
- sty_cycle : Cycler or operable of dict
- Style to apply to each set
-
- bottoms : array, optional
- The initial positions of the bottoms, defaults to 0
-
- hist_func : callable, optional
- Must have signature `bin_vals, bin_edges = f(data)`.
- `bin_edges` expected to be one longer than `bin_vals`
-
- labels : list of str, optional
- The label for each set.
-
- If not given and stacked data is an array defaults to 'default set {n}'
-
- If stacked_data is a mapping, and labels is None, default to the keys
- (which may come out in a random order).
-
- If stacked_data is a mapping and labels is given then only
- the columns listed by be plotted.
-
- plot_func : callable, optional
- Function to call to draw the histogram must have signature:
-
- ret = plot_func(ax, edges, top, bottoms=bottoms,
- label=label, **kwargs)
-
- plot_kwargs : dict, optional
- Any extra kwargs to pass through to the plotting function. This
- will be the same for all calls to the plotting function and will
- over-ride the values in cycle.
-
- Returns
- -------
- arts : dict
- Dictionary of artists keyed on their labels
- """
- # deal with default binning function
- if hist_func is None:
- hist_func = np.histogram
-
- # deal with default plotting function
- if plot_func is None:
- plot_func = filled_hist
-
- # deal with default
- if plot_kwargs is None:
- plot_kwargs = {}
- print(plot_kwargs)
- try:
- l_keys = stacked_data.keys()
- label_data = True
- if labels is None:
- labels = l_keys
-
- except AttributeError:
- label_data = False
- if labels is None:
- labels = itertools.repeat(None)
-
- if label_data:
- loop_iter = enumerate((stacked_data[lab], lab, s) for lab, s in
- zip(labels, sty_cycle))
- else:
- loop_iter = enumerate(zip(stacked_data, labels, sty_cycle))
-
- arts = {}
- for j, (data, label, sty) in loop_iter:
- if label is None:
- label = 'dflt set {n}'.format(n=j)
- label = sty.pop('label', label)
- vals, edges = hist_func(data)
- if bottoms is None:
- bottoms = np.zeros_like(vals)
- top = bottoms + vals
- print(sty)
- sty.update(plot_kwargs)
- print(sty)
- ret = plot_func(ax, edges, top, bottoms=bottoms,
- label=label, **sty)
- bottoms = top
- arts[label] = ret
- ax.legend(fontsize=10)
- return arts
-
-
- # set up histogram function to fixed bins
- edges = np.linspace(-3, 3, 20, endpoint=True)
- hist_func = partial(np.histogram, bins=edges)
-
- # set up style cycles
- color_cycle = cycler(facecolor=plt.rcParams['axes.prop_cycle'][:4])
- label_cycle = cycler('label', ['set {n}'.format(n=n) for n in range(4)])
- hatch_cycle = cycler('hatch', ['/', '*', '+', '|'])
-
- # make some synthetic data
- np.random.seed(0)
- stack_data = np.random.randn(4, 12250)
- dict_data = OrderedDict(zip((c['label'] for c in label_cycle), stack_data))
-
- # work with plain arrays
- fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(9, 4.5), tight_layout=True)
- arts = stack_hist(ax1, stack_data, color_cycle + label_cycle + hatch_cycle,
- hist_func=hist_func)
-
- arts = stack_hist(ax2, stack_data, color_cycle,
- hist_func=hist_func,
- plot_kwargs=dict(edgecolor='w', orientation='h'))
- ax1.set_ylabel('counts')
- ax1.set_xlabel('x')
- ax2.set_xlabel('counts')
- ax2.set_ylabel('x')
-
- # work with labeled data
-
- fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(9, 4.5),
- tight_layout=True, sharey=True)
-
- arts = stack_hist(ax1, dict_data, color_cycle + hatch_cycle,
- hist_func=hist_func)
-
- arts = stack_hist(ax2, dict_data, color_cycle + hatch_cycle,
- hist_func=hist_func, labels=['set 0', 'set 3'])
- ax1.xaxis.set_major_locator(mticker.MaxNLocator(5))
- ax1.set_xlabel('counts')
- ax1.set_ylabel('x')
- ax2.set_ylabel('x')
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/filled_step.txt b/_sources/examples/api/filled_step.txt
deleted file mode 100644
index ec732d9a52f..00000000000
--- a/_sources/examples/api/filled_step.txt
+++ /dev/null
@@ -1,221 +0,0 @@
-.. _api-filled_step:
-
-api example code: filled_step.py
-================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/filled_step.py
-
-::
-
- import itertools
- from functools import partial
-
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.ticker as mticker
- from cycler import cycler
- from six.moves import zip
-
-
- def filled_hist(ax, edges, values, bottoms=None, orientation='v',
- **kwargs):
- """
- Draw a histogram as a stepped patch.
-
- Extra kwargs are passed through to `fill_between`
-
- Parameters
- ----------
- ax : Axes
- The axes to plot to
-
- edges : array
- A length n+1 array giving the left edges of each bin and the
- right edge of the last bin.
-
- values : array
- A length n array of bin counts or values
-
- bottoms : scalar or array, optional
- A length n array of the bottom of the bars. If None, zero is used.
-
- orientation : {'v', 'h'}
- Orientation of the histogram. 'v' (default) has
- the bars increasing in the positive y-direction.
-
- Returns
- -------
- ret : PolyCollection
- Artist added to the Axes
- """
- print(orientation)
- if orientation not in set('hv'):
- raise ValueError("orientation must be in {{'h', 'v'}} "
- "not {o}".format(o=orientation))
-
- kwargs.setdefault('step', 'post')
- edges = np.asarray(edges)
- values = np.asarray(values)
- if len(edges) - 1 != len(values):
- raise ValueError('Must provide one more bin edge than value not: '
- 'len(edges): {lb} len(values): {lv}'.format(
- lb=len(edges), lv=len(values)))
-
- if bottoms is None:
- bottoms = np.zeros_like(values)
- if np.isscalar(bottoms):
- bottoms = np.ones_like(values) * bottoms
-
- values = np.r_[values, values[-1]]
- bottoms = np.r_[bottoms, bottoms[-1]]
- if orientation == 'h':
- return ax.fill_betweenx(edges, values, bottoms, **kwargs)
- elif orientation == 'v':
- return ax.fill_between(edges, values, bottoms, **kwargs)
- else:
- raise AssertionError("you should never be here")
-
-
- def stack_hist(ax, stacked_data, sty_cycle, bottoms=None,
- hist_func=None, labels=None,
- plot_func=None, plot_kwargs=None):
- """
- ax : axes.Axes
- The axes to add artists too
-
- stacked_data : array or Mapping
- A (N, M) shaped array. The first dimension will be iterated over to
- compute histograms row-wise
-
- sty_cycle : Cycler or operable of dict
- Style to apply to each set
-
- bottoms : array, optional
- The initial positions of the bottoms, defaults to 0
-
- hist_func : callable, optional
- Must have signature `bin_vals, bin_edges = f(data)`.
- `bin_edges` expected to be one longer than `bin_vals`
-
- labels : list of str, optional
- The label for each set.
-
- If not given and stacked data is an array defaults to 'default set {n}'
-
- If stacked_data is a mapping, and labels is None, default to the keys
- (which may come out in a random order).
-
- If stacked_data is a mapping and labels is given then only
- the columns listed by be plotted.
-
- plot_func : callable, optional
- Function to call to draw the histogram must have signature:
-
- ret = plot_func(ax, edges, top, bottoms=bottoms,
- label=label, **kwargs)
-
- plot_kwargs : dict, optional
- Any extra kwargs to pass through to the plotting function. This
- will be the same for all calls to the plotting function and will
- over-ride the values in cycle.
-
- Returns
- -------
- arts : dict
- Dictionary of artists keyed on their labels
- """
- # deal with default binning function
- if hist_func is None:
- hist_func = np.histogram
-
- # deal with default plotting function
- if plot_func is None:
- plot_func = filled_hist
-
- # deal with default
- if plot_kwargs is None:
- plot_kwargs = {}
- print(plot_kwargs)
- try:
- l_keys = stacked_data.keys()
- label_data = True
- if labels is None:
- labels = l_keys
-
- except AttributeError:
- label_data = False
- if labels is None:
- labels = itertools.repeat(None)
-
- if label_data:
- loop_iter = enumerate((stacked_data[lab], lab, s) for lab, s in
- zip(labels, sty_cycle))
- else:
- loop_iter = enumerate(zip(stacked_data, labels, sty_cycle))
-
- arts = {}
- for j, (data, label, sty) in loop_iter:
- if label is None:
- label = 'dflt set {n}'.format(n=j)
- label = sty.pop('label', label)
- vals, edges = hist_func(data)
- if bottoms is None:
- bottoms = np.zeros_like(vals)
- top = bottoms + vals
- print(sty)
- sty.update(plot_kwargs)
- print(sty)
- ret = plot_func(ax, edges, top, bottoms=bottoms,
- label=label, **sty)
- bottoms = top
- arts[label] = ret
- ax.legend(fontsize=10)
- return arts
-
-
- # set up histogram function to fixed bins
- edges = np.linspace(-3, 3, 20, endpoint=True)
- hist_func = partial(np.histogram, bins=edges)
-
- # set up style cycles
- color_cycle = cycler('facecolor', 'rgbm')
- label_cycle = cycler('label', ['set {n}'.format(n=n) for n in range(4)])
- hatch_cycle = cycler('hatch', ['/', '*', '+', '|'])
-
- # make some synthetic data
- stack_data = np.random.randn(4, 12250)
- dict_data = {lab: d for lab, d in zip(list(c['label'] for c in label_cycle),
- stack_data)}
-
- # work with plain arrays
- fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(9, 4.5), tight_layout=True)
- arts = stack_hist(ax1, stack_data, color_cycle + label_cycle + hatch_cycle,
- hist_func=hist_func)
-
- arts = stack_hist(ax2, stack_data, color_cycle,
- hist_func=hist_func,
- plot_kwargs=dict(edgecolor='w', orientation='h'))
- ax1.set_ylabel('counts')
- ax1.set_xlabel('x')
- ax2.set_xlabel('counts')
- ax2.set_ylabel('x')
-
- # work with labeled data
-
- fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(9, 4.5),
- tight_layout=True, sharey=True)
-
- arts = stack_hist(ax1, dict_data, color_cycle + hatch_cycle,
- hist_func=hist_func)
-
- arts = stack_hist(ax2, dict_data, color_cycle + hatch_cycle,
- hist_func=hist_func, labels=['set 0', 'set 3'])
- ax1.xaxis.set_major_locator(mticker.MaxNLocator(5))
- ax1.set_xlabel('counts')
- ax1.set_ylabel('x')
- ax2.set_ylabel('x')
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/font_family_rc.rst.txt b/_sources/examples/api/font_family_rc.rst.txt
deleted file mode 100644
index bb8631430c3..00000000000
--- a/_sources/examples/api/font_family_rc.rst.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-.. _api-font_family_rc:
-
-api example code: font_family_rc.py
-===================================
-
-[`source code `_]
-
-::
-
- """
- ===========================
- Configuring the font family
- ===========================
-
- You can explicitly set which font family is picked up for a given font
- style (e.g., 'serif', 'sans-serif', or 'monospace').
-
- In the example below, we only allow one font family (Tahoma) for the
- san-serif font style. You the default family with the font.family rc
- param, e.g.,::
-
- rcParams['font.family'] = 'sans-serif'
-
- and for the font.family you set a list of font styles to try to find
- in order::
-
- rcParams['font.sans-serif'] = ['Tahoma', 'DejaVu Sans',
- 'Lucida Grande', 'Verdana']
-
- """
-
- # -*- noplot -*-
-
- from matplotlib import rcParams
- rcParams['font.family'] = 'sans-serif'
- rcParams['font.sans-serif'] = ['Tahoma']
- import matplotlib.pyplot as plt
-
- fig, ax = plt.subplots()
- ax.plot([1, 2, 3], label='test')
-
- ax.legend()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/font_family_rc.txt b/_sources/examples/api/font_family_rc.txt
deleted file mode 100644
index e78912d2801..00000000000
--- a/_sources/examples/api/font_family_rc.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-.. _api-font_family_rc:
-
-api example code: font_family_rc.py
-===================================
-
-[`source code `_]
-
-::
-
- """
- You can explicitly set which font family is picked up for a given font
- style (e.g., 'serif', 'sans-serif', or 'monospace').
-
- In the example below, we only allow one font family (Tahoma) for the
- san-serif font style. You the default family with the font.family rc
- param, e.g.,::
-
- rcParams['font.family'] = 'sans-serif'
-
- and for the font.family you set a list of font styles to try to find
- in order::
-
- rcParams['font.sans-serif'] = ['Tahoma', 'Bitstream Vera Sans',
- 'Lucida Grande', 'Verdana']
-
- """
-
- # -*- noplot -*-
-
- from matplotlib import rcParams
- rcParams['font.family'] = 'sans-serif'
- rcParams['font.sans-serif'] = ['Tahoma']
- import matplotlib.pyplot as plt
-
- fig, ax = plt.subplots()
- ax.plot([1, 2, 3], label='test')
-
- ax.legend()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/font_file.rst.txt b/_sources/examples/api/font_file.rst.txt
deleted file mode 100644
index cd4ac7d524a..00000000000
--- a/_sources/examples/api/font_file.rst.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-.. _api-font_file:
-
-api example code: font_file.py
-==============================
-
-[`source code `_]
-
-::
-
- # -*- noplot -*-
- """
- ===================================
- Using a ttf font file in matplotlib
- ===================================
-
- Although it is usually not a good idea to explicitly point to a single
- ttf file for a font instance, you can do so using the
- font_manager.FontProperties fname argument (for a more flexible
- solution, see the font_family_rc.py and fonts_demo.py examples).
- """
- import sys
- import os
- import matplotlib.font_manager as fm
-
- import matplotlib.pyplot as plt
-
- fig, ax = plt.subplots()
- ax.plot([1, 2, 3])
-
- if sys.platform == 'win32':
- fpath = 'C:\\Windows\\Fonts\\Tahoma.ttf'
- elif sys.platform.startswith('linux'):
- basedir = '/usr/share/fonts/truetype'
- fonts = ['freefont/FreeSansBoldOblique.ttf',
- 'ttf-liberation/LiberationSans-BoldItalic.ttf',
- 'msttcorefonts/Comic_Sans_MS.ttf']
- for fpath in fonts:
- if os.path.exists(os.path.join(basedir, fpath)):
- break
- else:
- fpath = '/Library/Fonts/Tahoma.ttf'
-
- if os.path.exists(fpath):
- prop = fm.FontProperties(fname=fpath)
- fname = os.path.split(fpath)[1]
- ax.set_title('this is a special font: %s' % fname, fontproperties=prop)
- else:
- ax.set_title('Demo fails--cannot find a demo font')
- ax.set_xlabel('This is the default font')
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/font_file.txt b/_sources/examples/api/font_file.txt
deleted file mode 100644
index 2d0ff754713..00000000000
--- a/_sources/examples/api/font_file.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-.. _api-font_file:
-
-api example code: font_file.py
-==============================
-
-[`source code `_]
-
-::
-
- # -*- noplot -*-
- """
- Although it is usually not a good idea to explicitly point to a single
- ttf file for a font instance, you can do so using the
- font_manager.FontProperties fname argument (for a more flexible
- solution, see the font_fmaily_rc.py and fonts_demo.py examples).
- """
- import sys
- import os
- import matplotlib.font_manager as fm
-
- import matplotlib.pyplot as plt
-
- fig, ax = plt.subplots()
- ax.plot([1, 2, 3])
-
- if sys.platform == 'win32':
- fpath = 'C:\\Windows\\Fonts\\Tahoma.ttf'
- elif sys.platform.startswith('linux'):
- basedir = '/usr/share/fonts/truetype'
- fonts = ['freefont/FreeSansBoldOblique.ttf',
- 'ttf-liberation/LiberationSans-BoldItalic.ttf',
- 'msttcorefonts/Comic_Sans_MS.ttf']
- for fpath in fonts:
- if os.path.exists(os.path.join(basedir, fpath)):
- break
- else:
- fpath = '/Library/Fonts/Tahoma.ttf'
-
- if os.path.exists(fpath):
- prop = fm.FontProperties(fname=fpath)
- fname = os.path.split(fpath)[1]
- ax.set_title('this is a special font: %s' % fname, fontproperties=prop)
- else:
- ax.set_title('Demo fails--cannot find a demo font')
- ax.set_xlabel('This is the default font')
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/hinton_demo.txt b/_sources/examples/api/hinton_demo.txt
deleted file mode 100644
index 3ad6465be21..00000000000
--- a/_sources/examples/api/hinton_demo.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-.. _api-hinton_demo:
-
-api example code: hinton_demo.py
-================================
-
-
-
-.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/api/hinton_demo.py
-
-::
-
- #Initial idea from David Warde-Farley on the SciPy Cookbook
- import numpy as np
- import matplotlib.pyplot as plt
- from matplotlib.patches import Rectangle
- from matplotlib.ticker import NullLocator
- #from matplotlib.collections import RegularPolyCollection
- #from matplotlib.colors import BoundaryNorm, ListedColormap
-
- def hinton(W, maxWeight=None, ax=None):
- """
- Draws a Hinton diagram for visualizing a weight matrix.
- """
- if not ax:
- fig = plt.figure()
- ax = fig.add_subplot(1, 1, 1)
-
- if not maxWeight:
- maxWeight = 2**np.ceil(np.log(np.abs(W).max())/np.log(2))
-
- ax.patch.set_facecolor('gray')
- ax.set_aspect('equal', 'box')
- ax.xaxis.set_major_locator(NullLocator())
- ax.yaxis.set_major_locator(NullLocator())
-
- for (x,y),w in np.ndenumerate(W):
- if w > 0: color = 'white'
- else: color = 'black'
- size = np.sqrt(np.abs(w))
- rect = Rectangle([x - size / 2, y - size / 2], size, size,
- facecolor=color, edgecolor=color)
- ax.add_patch(rect)
- ax.autoscale_view()
-
- # Reverse the yaxis limits
- ax.set_ylim(*ax.get_ylim()[::-1])
-
- ## Potential way using polygon collections that just has an issue with
- ## easily getting the squares scaled by the data.
-
- # height,width = W.shape
- # x = np.arange(width)
- # y = np.arange(height)
- # X,Y = np.meshgrid(x, y)
- # xy = np.array([X.flatten(),Y.flatten()]).T
- # scaled_data = W.flatten() / maxWeight
- # cmap = ListedColormap(['black', 'white'])
- # norm = BoundaryNorm([-1., 0., 1.], cmap.N)
-
- # rect_col = RegularPolyCollection(4, rotation=np.pi/4,
- # sizes=np.abs(scaled_data) * 72 / ax.figure.get_dpi(), offsets=xy,
- # transOffset=ax.transData, norm=norm, cmap=cmap, edgecolor='none')
- # ax.add_collection(rect_col)
- # rect_col.set_array(scaled_data)
- # ax.autoscale_view()
-
- if __name__ == '__main__':
- hinton(np.random.rand(20, 20) - 0.5)
- plt.title('Hinton Example')
- plt.show()
-
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/histogram_demo.txt b/_sources/examples/api/histogram_demo.txt
deleted file mode 100644
index dd743205ba9..00000000000
--- a/_sources/examples/api/histogram_demo.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-.. _api-histogram_demo:
-
-api example code: histogram_demo.py
-===================================
-
-
-
-.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/api/histogram_demo.py
-
-::
-
- """
- Make a histogram of normally distributed random numbers and plot the
- analytic PDF over it
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.mlab as mlab
-
- mu, sigma = 100, 15
- x = mu + sigma * np.random.randn(10000)
-
- fig = plt.figure()
- ax = fig.add_subplot(111)
-
- # the histogram of the data
- n, bins, patches = ax.hist(x, 50, normed=1, facecolor='green', alpha=0.75)
-
- # hist uses np.histogram under the hood to create 'n' and 'bins'.
- # np.histogram returns the bin edges, so there will be 50 probability
- # density values in n, 51 bin edges in bins and 50 patches. To get
- # everything lined up, we'll compute the bin centers
- bincenters = 0.5*(bins[1:]+bins[:-1])
- # add a 'best fit' line for the normal PDF
- y = mlab.normpdf( bincenters, mu, sigma)
- l = ax.plot(bincenters, y, 'r--', linewidth=1)
-
- ax.set_xlabel('Smarts')
- ax.set_ylabel('Probability')
- #ax.set_title(r'$\mathrm{Histogram\ of\ IQ:}\ \mu=100,\ \sigma=15$')
- ax.set_xlim(40, 160)
- ax.set_ylim(0, 0.03)
- ax.grid(True)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/histogram_path_demo.rst.txt b/_sources/examples/api/histogram_path_demo.rst.txt
deleted file mode 100644
index 282043be501..00000000000
--- a/_sources/examples/api/histogram_path_demo.rst.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-.. _api-histogram_path_demo:
-
-api example code: histogram_path_demo.py
-========================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/histogram_path_demo.py
-
-::
-
- """
- ========================================================
- Building histograms using Rectangles and PolyCollections
- ========================================================
-
- This example shows how to use a path patch to draw a bunch of
- rectangles. The technique of using lots of Rectangle instances, or
- the faster method of using PolyCollections, were implemented before we
- had proper paths with moveto/lineto, closepoly etc in mpl. Now that
- we have them, we can draw collections of regularly shaped objects with
- homogeneous properties more efficiently with a PathCollection. This
- example makes a histogram -- its more work to set up the vertex arrays
- at the outset, but it should be much faster for large numbers of
- objects
- """
-
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.patches as patches
- import matplotlib.path as path
-
- fig, ax = plt.subplots()
-
- # histogram our data with numpy
- data = np.random.randn(1000)
- n, bins = np.histogram(data, 50)
-
- # get the corners of the rectangles for the histogram
- left = np.array(bins[:-1])
- right = np.array(bins[1:])
- bottom = np.zeros(len(left))
- top = bottom + n
-
-
- # we need a (numrects x numsides x 2) numpy array for the path helper
- # function to build a compound path
- XY = np.array([[left, left, right, right], [bottom, top, top, bottom]]).T
-
- # get the Path object
- barpath = path.Path.make_compound_path_from_polys(XY)
-
- # make a patch out of it
- patch = patches.PathPatch(barpath)
- ax.add_patch(patch)
-
- # update the view limits
- ax.set_xlim(left[0], right[-1])
- ax.set_ylim(bottom.min(), top.max())
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/histogram_path_demo.txt b/_sources/examples/api/histogram_path_demo.txt
deleted file mode 100644
index f81cb8fe9b6..00000000000
--- a/_sources/examples/api/histogram_path_demo.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-.. _api-histogram_path_demo:
-
-api example code: histogram_path_demo.py
-========================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/histogram_path_demo.py
-
-::
-
- """
- This example shows how to use a path patch to draw a bunch of
- rectangles. The technique of using lots of Rectangle instances, or
- the faster method of using PolyCollections, were implemented before we
- had proper paths with moveto/lineto, closepoly etc in mpl. Now that
- we have them, we can draw collections of regularly shaped objects with
- homogeous properties more efficiently with a PathCollection. This
- example makes a histogram -- its more work to set up the vertex arrays
- at the outset, but it should be much faster for large numbers of
- objects
- """
-
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.patches as patches
- import matplotlib.path as path
-
- fig, ax = plt.subplots()
-
- # histogram our data with numpy
- data = np.random.randn(1000)
- n, bins = np.histogram(data, 50)
-
- # get the corners of the rectangles for the histogram
- left = np.array(bins[:-1])
- right = np.array(bins[1:])
- bottom = np.zeros(len(left))
- top = bottom + n
-
-
- # we need a (numrects x numsides x 2) numpy array for the path helper
- # function to build a compound path
- XY = np.array([[left, left, right, right], [bottom, top, top, bottom]]).T
-
- # get the Path object
- barpath = path.Path.make_compound_path_from_polys(XY)
-
- # make a patch out of it
- patch = patches.PathPatch(
- barpath, facecolor='blue', edgecolor='gray', alpha=0.8)
- ax.add_patch(patch)
-
- # update the view limits
- ax.set_xlim(left[0], right[-1])
- ax.set_ylim(bottom.min(), top.max())
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/image_zcoord.rst.txt b/_sources/examples/api/image_zcoord.rst.txt
deleted file mode 100644
index 56cc3870a4d..00000000000
--- a/_sources/examples/api/image_zcoord.rst.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-.. _api-image_zcoord:
-
-api example code: image_zcoord.py
-=================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/image_zcoord.py
-
-::
-
- """
- ==================================
- Modifying the coordinate formatter
- ==================================
-
- Show how to modify the coordinate formatter to report the image "z"
- value of the nearest pixel given x and y
- """
- import numpy as np
- import matplotlib.pyplot as plt
-
- X = 10*np.random.rand(5, 3)
-
- fig, ax = plt.subplots()
- ax.imshow(X, interpolation='nearest')
-
- numrows, numcols = X.shape
-
-
- def format_coord(x, y):
- col = int(x + 0.5)
- row = int(y + 0.5)
- if col >= 0 and col < numcols and row >= 0 and row < numrows:
- z = X[row, col]
- return 'x=%1.4f, y=%1.4f, z=%1.4f' % (x, y, z)
- else:
- return 'x=%1.4f, y=%1.4f' % (x, y)
-
- ax.format_coord = format_coord
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/image_zcoord.txt b/_sources/examples/api/image_zcoord.txt
deleted file mode 100644
index 23a7dc9394c..00000000000
--- a/_sources/examples/api/image_zcoord.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-.. _api-image_zcoord:
-
-api example code: image_zcoord.py
-=================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/image_zcoord.py
-
-::
-
- """
- Show how to modify the coordinate formatter to report the image "z"
- value of the nearest pixel given x and y
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.cm as cm
-
- X = 10*np.random.rand(5, 3)
-
- fig, ax = plt.subplots()
- ax.imshow(X, cmap=cm.jet, interpolation='nearest')
-
- numrows, numcols = X.shape
-
-
- def format_coord(x, y):
- col = int(x + 0.5)
- row = int(y + 0.5)
- if col >= 0 and col < numcols and row >= 0 and row < numrows:
- z = X[row, col]
- return 'x=%1.4f, y=%1.4f, z=%1.4f' % (x, y, z)
- else:
- return 'x=%1.4f, y=%1.4f' % (x, y)
-
- ax.format_coord = format_coord
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/index.rst.txt b/_sources/examples/api/index.rst.txt
deleted file mode 100644
index 01988c4694b..00000000000
--- a/_sources/examples/api/index.rst.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-.. _api-examples-index:
-
-##############################################
-api Examples
-##############################################
-
-.. htmlonly::
-
- :Release: |version|
- :Date: |today|
-
-.. toctree::
- :maxdepth: 1
-
- agg_oo
- barchart_demo
- bbox_intersect
- collections_demo
- colorbar_basics
- colorbar_only
- compound_path
- custom_projection_example
- custom_scale_example
- date_demo
- date_index_formatter
- demo_affine_image
- donut_demo
- engineering_formatter
- filled_step
- font_family_rc
- font_file
- histogram_path_demo
- image_zcoord
- joinstyle
- legend_demo
- line_with_text
- logo2
- mathtext_asarray
- patch_collection
- power_norm_demo
- quad_bezier
- radar_chart
- sankey_demo_basics
- sankey_demo_links
- sankey_demo_old
- sankey_demo_rankine
- scatter_piecharts
- skewt
- span_regions
- two_scales
- unicode_minus
- watermark_image
- watermark_text
diff --git a/_sources/examples/api/index.txt b/_sources/examples/api/index.txt
deleted file mode 100644
index 19a32ffd783..00000000000
--- a/_sources/examples/api/index.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-.. _api-examples-index:
-
-##############################################
-api Examples
-##############################################
-
-.. htmlonly::
-
- :Release: |version|
- :Date: |today|
-
-.. toctree::
- :maxdepth: 1
-
- agg_oo
- barchart_demo
- bbox_intersect
- collections_demo
- colorbar_only
- compound_path
- custom_projection_example
- custom_scale_example
- date_demo
- date_index_formatter
- demo_affine_image
- donut_demo
- engineering_formatter
- filled_step
- font_family_rc
- font_file
- histogram_path_demo
- image_zcoord
- joinstyle
- legend_demo
- line_with_text
- logo2
- mathtext_asarray
- patch_collection
- power_norm_demo
- quad_bezier
- radar_chart
- sankey_demo_basics
- sankey_demo_links
- sankey_demo_old
- sankey_demo_rankine
- scatter_piecharts
- skewt
- span_regions
- two_scales
- unicode_minus
- watermark_image
- watermark_text
diff --git a/_sources/examples/api/joinstyle.rst.txt b/_sources/examples/api/joinstyle.rst.txt
deleted file mode 100644
index 37f70a660e2..00000000000
--- a/_sources/examples/api/joinstyle.rst.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-.. _api-joinstyle:
-
-api example code: joinstyle.py
-==============================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/joinstyle.py
-
-::
-
- """
- ===========
- Join styles
- ===========
-
- Illustrate the three different join styles
- """
-
- import numpy as np
- import matplotlib.pyplot as plt
-
-
- def plot_angle(ax, x, y, angle, style):
- phi = np.radians(angle)
- xx = [x + .5, x, x + .5*np.cos(phi)]
- yy = [y, y, y + .5*np.sin(phi)]
- ax.plot(xx, yy, lw=8, color='blue', solid_joinstyle=style)
- ax.plot(xx[1:], yy[1:], lw=1, color='black')
- ax.plot(xx[1::-1], yy[1::-1], lw=1, color='black')
- ax.plot(xx[1:2], yy[1:2], 'o', color='red', markersize=3)
- ax.text(x, y + .2, '%.0f degrees' % angle)
-
- fig, ax = plt.subplots()
- ax.set_title('Join style')
-
- for x, style in enumerate((('miter', 'round', 'bevel'))):
- ax.text(x, 5, style)
- for i in range(5):
- plot_angle(ax, x, i, pow(2.0, 3 + i), style)
-
- ax.set_xlim(-.5, 2.75)
- ax.set_ylim(-.5, 5.5)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/joinstyle.txt b/_sources/examples/api/joinstyle.txt
deleted file mode 100644
index e9751e74650..00000000000
--- a/_sources/examples/api/joinstyle.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-.. _api-joinstyle:
-
-api example code: joinstyle.py
-==============================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/joinstyle.py
-
-::
-
- #!/usr/bin/env python
- """
- Illustrate the three different join styles
- """
-
- import numpy as np
- import matplotlib.pyplot as plt
-
-
- def plot_angle(ax, x, y, angle, style):
- phi = np.radians(angle)
- xx = [x + .5, x, x + .5*np.cos(phi)]
- yy = [y, y, y + .5*np.sin(phi)]
- ax.plot(xx, yy, lw=8, color='blue', solid_joinstyle=style)
- ax.plot(xx[1:], yy[1:], lw=1, color='black')
- ax.plot(xx[1::-1], yy[1::-1], lw=1, color='black')
- ax.plot(xx[1:2], yy[1:2], 'o', color='red', markersize=3)
- ax.text(x, y + .2, '%.0f degrees' % angle)
-
- fig, ax = plt.subplots()
- ax.set_title('Join style')
-
- for x, style in enumerate((('miter', 'round', 'bevel'))):
- ax.text(x, 5, style)
- for i in range(5):
- plot_angle(ax, x, i, pow(2.0, 3 + i), style)
-
- ax.set_xlim(-.5, 2.75)
- ax.set_ylim(-.5, 5.5)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/legend_demo.rst.txt b/_sources/examples/api/legend_demo.rst.txt
deleted file mode 100644
index f3f9a22e9a4..00000000000
--- a/_sources/examples/api/legend_demo.rst.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-.. _api-legend_demo:
-
-api example code: legend_demo.py
-================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/legend_demo.py
-
-::
-
- """
- ===============================
- Legend using pre-defined labels
- ===============================
-
- Notice how the legend labels are defined with the plots!
- """
-
-
- import numpy as np
- import matplotlib.pyplot as plt
-
- # Make some fake data.
- a = b = np.arange(0, 3, .02)
- c = np.exp(a)
- d = c[::-1]
-
- # Create plots with pre-defined labels.
- fig, ax = plt.subplots()
- ax.plot(a, c, 'k--', label='Model length')
- ax.plot(a, d, 'k:', label='Data length')
- ax.plot(a, c + d, 'k', label='Total message length')
-
- legend = ax.legend(loc='upper center', shadow=True, fontsize='x-large')
-
- # Put a nicer background color on the legend.
- legend.get_frame().set_facecolor('#00FFCC')
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/legend_demo.txt b/_sources/examples/api/legend_demo.txt
deleted file mode 100644
index c91bb7847db..00000000000
--- a/_sources/examples/api/legend_demo.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-.. _api-legend_demo:
-
-api example code: legend_demo.py
-================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/legend_demo.py
-
-::
-
- import numpy as np
- import matplotlib.pyplot as plt
-
- # Make some fake data.
- a = b = np.arange(0, 3, .02)
- c = np.exp(a)
- d = c[::-1]
-
- # Create plots with pre-defined labels.
- plt.plot(a, c, 'k--', label='Model length')
- plt.plot(a, d, 'k:', label='Data length')
- plt.plot(a, c + d, 'k', label='Total message length')
-
- legend = plt.legend(loc='upper center', shadow=True, fontsize='x-large')
-
- # Put a nicer background color on the legend.
- legend.get_frame().set_facecolor('#00FFCC')
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/line_with_text.rst.txt b/_sources/examples/api/line_with_text.rst.txt
deleted file mode 100644
index 20fd49b93ea..00000000000
--- a/_sources/examples/api/line_with_text.rst.txt
+++ /dev/null
@@ -1,77 +0,0 @@
-.. _api-line_with_text:
-
-api example code: line_with_text.py
-===================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/line_with_text.py
-
-::
-
- """
- =======================
- Artist within an artist
- =======================
-
- Show how to override basic methods so an artist can contain another
- artist. In this case, the line contains a Text instance to label it.
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.lines as lines
- import matplotlib.transforms as mtransforms
- import matplotlib.text as mtext
-
-
- class MyLine(lines.Line2D):
- def __init__(self, *args, **kwargs):
- # we'll update the position when the line data is set
- self.text = mtext.Text(0, 0, '')
- lines.Line2D.__init__(self, *args, **kwargs)
-
- # we can't access the label attr until *after* the line is
- # inited
- self.text.set_text(self.get_label())
-
- def set_figure(self, figure):
- self.text.set_figure(figure)
- lines.Line2D.set_figure(self, figure)
-
- def set_axes(self, axes):
- self.text.set_axes(axes)
- lines.Line2D.set_axes(self, axes)
-
- def set_transform(self, transform):
- # 2 pixel offset
- texttrans = transform + mtransforms.Affine2D().translate(2, 2)
- self.text.set_transform(texttrans)
- lines.Line2D.set_transform(self, transform)
-
- def set_data(self, x, y):
- if len(x):
- self.text.set_position((x[-1], y[-1]))
-
- lines.Line2D.set_data(self, x, y)
-
- def draw(self, renderer):
- # draw my label at the end of the line with 2 pixel offset
- lines.Line2D.draw(self, renderer)
- self.text.draw(renderer)
-
-
- fig, ax = plt.subplots()
- x, y = np.random.rand(2, 20)
- line = MyLine(x, y, mfc='red', ms=12, label='line label')
- #line.text.set_text('line label')
- line.text.set_color('red')
- line.text.set_fontsize(16)
-
-
- ax.add_line(line)
-
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/line_with_text.txt b/_sources/examples/api/line_with_text.txt
deleted file mode 100644
index c212e5262fc..00000000000
--- a/_sources/examples/api/line_with_text.txt
+++ /dev/null
@@ -1,73 +0,0 @@
-.. _api-line_with_text:
-
-api example code: line_with_text.py
-===================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/line_with_text.py
-
-::
-
- """
- Show how to override basic methods so an artist can contain another
- artist. In this case, the line contains a Text instance to label it.
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.lines as lines
- import matplotlib.transforms as mtransforms
- import matplotlib.text as mtext
-
-
- class MyLine(lines.Line2D):
- def __init__(self, *args, **kwargs):
- # we'll update the position when the line data is set
- self.text = mtext.Text(0, 0, '')
- lines.Line2D.__init__(self, *args, **kwargs)
-
- # we can't access the label attr until *after* the line is
- # inited
- self.text.set_text(self.get_label())
-
- def set_figure(self, figure):
- self.text.set_figure(figure)
- lines.Line2D.set_figure(self, figure)
-
- def set_axes(self, axes):
- self.text.set_axes(axes)
- lines.Line2D.set_axes(self, axes)
-
- def set_transform(self, transform):
- # 2 pixel offset
- texttrans = transform + mtransforms.Affine2D().translate(2, 2)
- self.text.set_transform(texttrans)
- lines.Line2D.set_transform(self, transform)
-
- def set_data(self, x, y):
- if len(x):
- self.text.set_position((x[-1], y[-1]))
-
- lines.Line2D.set_data(self, x, y)
-
- def draw(self, renderer):
- # draw my label at the end of the line with 2 pixel offset
- lines.Line2D.draw(self, renderer)
- self.text.draw(renderer)
-
-
- fig, ax = plt.subplots()
- x, y = np.random.rand(2, 20)
- line = MyLine(x, y, mfc='red', ms=12, label='line label')
- #line.text.set_text('line label')
- line.text.set_color('red')
- line.text.set_fontsize(16)
-
-
- ax.add_line(line)
-
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/logo2.rst.txt b/_sources/examples/api/logo2.rst.txt
deleted file mode 100644
index 766a80c72ae..00000000000
--- a/_sources/examples/api/logo2.rst.txt
+++ /dev/null
@@ -1,103 +0,0 @@
-.. _api-logo2:
-
-api example code: logo2.py
-==========================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/logo2.py
-
-::
-
- """
- ==========
- matplotlib
- ==========
-
- Thanks to Tony Yu for the logo design
- """
-
- import numpy as np
- import matplotlib as mpl
- import matplotlib.pyplot as plt
- import matplotlib.cm as cm
-
- mpl.rcParams['xtick.labelsize'] = 10
- mpl.rcParams['ytick.labelsize'] = 12
- mpl.rcParams['axes.edgecolor'] = 'gray'
-
-
- axalpha = 0.05
- figcolor = 'white'
- dpi = 80
- fig = plt.figure(figsize=(6, 1.1), dpi=dpi)
- fig.figurePatch.set_edgecolor(figcolor)
- fig.figurePatch.set_facecolor(figcolor)
-
-
- def add_math_background():
- ax = fig.add_axes([0., 0., 1., 1.])
-
- text = []
- text.append(
- (r"$W^{3\beta}_{\delta_1 \rho_1 \sigma_2} = "
- r"U^{3\beta}_{\delta_1 \rho_1} + \frac{1}{8 \pi 2}"
- r"\int^{\alpha_2}_{\alpha_2} d \alpha^\prime_2 "
- r"\left[\frac{ U^{2\beta}_{\delta_1 \rho_1} - "
- r"\alpha^\prime_2U^{1\beta}_{\rho_1 \sigma_2} "
- r"}{U^{0\beta}_{\rho_1 \sigma_2}}\right]$", (0.7, 0.2), 20))
- text.append((r"$\frac{d\rho}{d t} + \rho \vec{v}\cdot\nabla\vec{v} "
- r"= -\nabla p + \mu\nabla^2 \vec{v} + \rho \vec{g}$",
- (0.35, 0.9), 20))
- text.append((r"$\int_{-\infty}^\infty e^{-x^2}dx=\sqrt{\pi}$",
- (0.15, 0.3), 25))
- text.append((r"$F_G = G\frac{m_1m_2}{r^2}$",
- (0.85, 0.7), 30))
- for eq, (x, y), size in text:
- ax.text(x, y, eq, ha='center', va='center', color="#11557c",
- alpha=0.25, transform=ax.transAxes, fontsize=size)
- ax.set_axis_off()
- return ax
-
-
- def add_matplotlib_text(ax):
- ax.text(0.95, 0.5, 'matplotlib', color='#11557c', fontsize=65,
- ha='right', va='center', alpha=1.0, transform=ax.transAxes)
-
-
- def add_polar_bar():
- ax = fig.add_axes([0.025, 0.075, 0.2, 0.85], projection='polar')
-
- ax.axesPatch.set_alpha(axalpha)
- ax.set_axisbelow(True)
- N = 7
- arc = 2. * np.pi
- theta = np.arange(0.0, arc, arc/N)
- radii = 10 * np.array([0.2, 0.6, 0.8, 0.7, 0.4, 0.5, 0.8])
- width = np.pi / 4 * np.array([0.4, 0.4, 0.6, 0.8, 0.2, 0.5, 0.3])
- bars = ax.bar(theta, radii, width=width, bottom=0.0)
- for r, bar in zip(radii, bars):
- bar.set_facecolor(cm.jet(r/10.))
- bar.set_alpha(0.6)
-
- for label in ax.get_xticklabels() + ax.get_yticklabels():
- label.set_visible(False)
-
- for line in ax.get_ygridlines() + ax.get_xgridlines():
- line.set_lw(0.8)
- line.set_alpha(0.9)
- line.set_ls('-')
- line.set_color('0.5')
-
- ax.set_yticks(np.arange(1, 9, 2))
- ax.set_rmax(9)
-
-
- if __name__ == '__main__':
- main_axes = add_math_background()
- add_polar_bar()
- add_matplotlib_text(main_axes)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/logo2.txt b/_sources/examples/api/logo2.txt
deleted file mode 100644
index 30fdd5a691d..00000000000
--- a/_sources/examples/api/logo2.txt
+++ /dev/null
@@ -1,101 +0,0 @@
-.. _api-logo2:
-
-api example code: logo2.py
-==========================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/logo2.py
-
-::
-
- """
- Thanks to Tony Yu for the logo design
- """
-
- import numpy as np
- import matplotlib as mpl
- import matplotlib.pyplot as plt
- import matplotlib.cm as cm
-
- mpl.rcParams['xtick.labelsize'] = 10
- mpl.rcParams['ytick.labelsize'] = 12
- mpl.rcParams['axes.edgecolor'] = 'gray'
-
-
- axalpha = 0.05
- #figcolor = '#EFEFEF'
- figcolor = 'white'
- dpi = 80
- fig = plt.figure(figsize=(6, 1.1), dpi=dpi)
- fig.figurePatch.set_edgecolor(figcolor)
- fig.figurePatch.set_facecolor(figcolor)
-
-
- def add_math_background():
- ax = fig.add_axes([0., 0., 1., 1.])
-
- text = []
- text.append(
- (r"$W^{3\beta}_{\delta_1 \rho_1 \sigma_2} = "
- r"U^{3\beta}_{\delta_1 \rho_1} + \frac{1}{8 \pi 2}"
- r"\int^{\alpha_2}_{\alpha_2} d \alpha^\prime_2 "
- r"\left[\frac{ U^{2\beta}_{\delta_1 \rho_1} - "
- r"\alpha^\prime_2U^{1\beta}_{\rho_1 \sigma_2} "
- r"}{U^{0\beta}_{\rho_1 \sigma_2}}\right]$", (0.7, 0.2), 20))
- text.append((r"$\frac{d\rho}{d t} + \rho \vec{v}\cdot\nabla\vec{v} "
- r"= -\nabla p + \mu\nabla^2 \vec{v} + \rho \vec{g}$",
- (0.35, 0.9), 20))
- text.append((r"$\int_{-\infty}^\infty e^{-x^2}dx=\sqrt{\pi}$",
- (0.15, 0.3), 25))
- #text.append((r"$E = mc^2 = \sqrt{{m_0}^2c^4 + p^2c^2}$",
- # (0.7, 0.42), 30))
- text.append((r"$F_G = G\frac{m_1m_2}{r^2}$",
- (0.85, 0.7), 30))
- for eq, (x, y), size in text:
- ax.text(x, y, eq, ha='center', va='center', color="#11557c",
- alpha=0.25, transform=ax.transAxes, fontsize=size)
- ax.set_axis_off()
- return ax
-
-
- def add_matplotlib_text(ax):
- ax.text(0.95, 0.5, 'matplotlib', color='#11557c', fontsize=65,
- ha='right', va='center', alpha=1.0, transform=ax.transAxes)
-
-
- def add_polar_bar():
- ax = fig.add_axes([0.025, 0.075, 0.2, 0.85], projection='polar')
-
- ax.axesPatch.set_alpha(axalpha)
- ax.set_axisbelow(True)
- N = 7
- arc = 2. * np.pi
- theta = np.arange(0.0, arc, arc/N)
- radii = 10 * np.array([0.2, 0.6, 0.8, 0.7, 0.4, 0.5, 0.8])
- width = np.pi / 4 * np.array([0.4, 0.4, 0.6, 0.8, 0.2, 0.5, 0.3])
- bars = ax.bar(theta, radii, width=width, bottom=0.0)
- for r, bar in zip(radii, bars):
- bar.set_facecolor(cm.jet(r/10.))
- bar.set_alpha(0.6)
-
- for label in ax.get_xticklabels() + ax.get_yticklabels():
- label.set_visible(False)
-
- for line in ax.get_ygridlines() + ax.get_xgridlines():
- line.set_lw(0.8)
- line.set_alpha(0.9)
- line.set_ls('-')
- line.set_color('0.5')
-
- ax.set_yticks(np.arange(1, 9, 2))
- ax.set_rmax(9)
-
- if __name__ == '__main__':
- main_axes = add_math_background()
- add_polar_bar()
- add_matplotlib_text(main_axes)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/mathtext_asarray.rst.txt b/_sources/examples/api/mathtext_asarray.rst.txt
deleted file mode 100644
index 0476d8bd007..00000000000
--- a/_sources/examples/api/mathtext_asarray.rst.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-.. _api-mathtext_asarray:
-
-api example code: mathtext_asarray.py
-=====================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/mathtext_asarray.py
-
-::
-
- """
- ===============================
- A mathtext image as numpy array
- ===============================
-
- This example shows how to make images from LaTeX strings.
- """
-
- import matplotlib.mathtext as mathtext
- import matplotlib.pyplot as plt
- import matplotlib
- matplotlib.rc('image', origin='upper')
-
- parser = mathtext.MathTextParser("Bitmap")
- parser.to_png('test2.png',
- r'$\left[\left\lfloor\frac{5}{\frac{\left(3\right)}{4}} '
- r'y\right)\right]$', color='green', fontsize=14, dpi=100)
-
- rgba1, depth1 = parser.to_rgba(
- r'IQ: $\sigma_i=15$', color='blue', fontsize=20, dpi=200)
- rgba2, depth2 = parser.to_rgba(
- r'some other string', color='red', fontsize=20, dpi=200)
-
- fig = plt.figure()
- fig.figimage(rgba1.astype(float)/255., 100, 100)
- fig.figimage(rgba2.astype(float)/255., 100, 300)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/mathtext_asarray.txt b/_sources/examples/api/mathtext_asarray.txt
deleted file mode 100644
index b9a2e9a32f8..00000000000
--- a/_sources/examples/api/mathtext_asarray.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-.. _api-mathtext_asarray:
-
-api example code: mathtext_asarray.py
-=====================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/mathtext_asarray.py
-
-::
-
- """
- Load a mathtext image as numpy array
- """
-
- import matplotlib.mathtext as mathtext
- import matplotlib.pyplot as plt
- import matplotlib
- matplotlib.rc('image', origin='upper')
-
- parser = mathtext.MathTextParser("Bitmap")
- parser.to_png('test2.png',
- r'$\left[\left\lfloor\frac{5}{\frac{\left(3\right)}{4}} '
- r'y\right)\right]$', color='green', fontsize=14, dpi=100)
-
- rgba1, depth1 = parser.to_rgba(
- r'IQ: $\sigma_i=15$', color='blue', fontsize=20, dpi=200)
- rgba2, depth2 = parser.to_rgba(
- r'some other string', color='red', fontsize=20, dpi=200)
-
- fig = plt.figure()
- fig.figimage(rgba1.astype(float)/255., 100, 100)
- fig.figimage(rgba2.astype(float)/255., 100, 300)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/patch_collection.rst.txt b/_sources/examples/api/patch_collection.rst.txt
deleted file mode 100644
index 5b5d8b26cf5..00000000000
--- a/_sources/examples/api/patch_collection.rst.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-.. _api-patch_collection:
-
-api example code: patch_collection.py
-=====================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/patch_collection.py
-
-::
-
- """
- ============================
- Circles, Wedges and Polygons
- ============================
- """
-
- import numpy as np
- import matplotlib
- from matplotlib.patches import Circle, Wedge, Polygon
- from matplotlib.collections import PatchCollection
- import matplotlib.pyplot as plt
-
-
- fig, ax = plt.subplots()
-
- resolution = 50 # the number of vertices
- N = 3
- x = np.random.rand(N)
- y = np.random.rand(N)
- radii = 0.1*np.random.rand(N)
- patches = []
- for x1, y1, r in zip(x, y, radii):
- circle = Circle((x1, y1), r)
- patches.append(circle)
-
- x = np.random.rand(N)
- y = np.random.rand(N)
- radii = 0.1*np.random.rand(N)
- theta1 = 360.0*np.random.rand(N)
- theta2 = 360.0*np.random.rand(N)
- for x1, y1, r, t1, t2 in zip(x, y, radii, theta1, theta2):
- wedge = Wedge((x1, y1), r, t1, t2)
- patches.append(wedge)
-
- # Some limiting conditions on Wedge
- patches += [
- Wedge((.3, .7), .1, 0, 360), # Full circle
- Wedge((.7, .8), .2, 0, 360, width=0.05), # Full ring
- Wedge((.8, .3), .2, 0, 45), # Full sector
- Wedge((.8, .3), .2, 45, 90, width=0.10), # Ring sector
- ]
-
- for i in range(N):
- polygon = Polygon(np.random.rand(N, 2), True)
- patches.append(polygon)
-
- colors = 100*np.random.rand(len(patches))
- p = PatchCollection(patches, alpha=0.4)
- p.set_array(np.array(colors))
- ax.add_collection(p)
- fig.colorbar(p, ax=ax)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/patch_collection.txt b/_sources/examples/api/patch_collection.txt
deleted file mode 100644
index bb20e283fa0..00000000000
--- a/_sources/examples/api/patch_collection.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-.. _api-patch_collection:
-
-api example code: patch_collection.py
-=====================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/patch_collection.py
-
-::
-
- import numpy as np
- import matplotlib
- from matplotlib.patches import Circle, Wedge, Polygon
- from matplotlib.collections import PatchCollection
- import matplotlib.pyplot as plt
-
-
- fig, ax = plt.subplots()
-
- resolution = 50 # the number of vertices
- N = 3
- x = np.random.rand(N)
- y = np.random.rand(N)
- radii = 0.1*np.random.rand(N)
- patches = []
- for x1, y1, r in zip(x, y, radii):
- circle = Circle((x1, y1), r)
- patches.append(circle)
-
- x = np.random.rand(N)
- y = np.random.rand(N)
- radii = 0.1*np.random.rand(N)
- theta1 = 360.0*np.random.rand(N)
- theta2 = 360.0*np.random.rand(N)
- for x1, y1, r, t1, t2 in zip(x, y, radii, theta1, theta2):
- wedge = Wedge((x1, y1), r, t1, t2)
- patches.append(wedge)
-
- # Some limiting conditions on Wedge
- patches += [
- Wedge((.3, .7), .1, 0, 360), # Full circle
- Wedge((.7, .8), .2, 0, 360, width=0.05), # Full ring
- Wedge((.8, .3), .2, 0, 45), # Full sector
- Wedge((.8, .3), .2, 45, 90, width=0.10), # Ring sector
- ]
-
- for i in range(N):
- polygon = Polygon(np.random.rand(N, 2), True)
- patches.append(polygon)
-
- colors = 100*np.random.rand(len(patches))
- p = PatchCollection(patches, cmap=matplotlib.cm.jet, alpha=0.4)
- p.set_array(np.array(colors))
- ax.add_collection(p)
- plt.colorbar(p)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/path_patch_demo.txt b/_sources/examples/api/path_patch_demo.txt
deleted file mode 100644
index f1d4d801a90..00000000000
--- a/_sources/examples/api/path_patch_demo.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-.. _api-path_patch_demo:
-
-api example code: path_patch_demo.py
-====================================
-
-
-
-.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/api/path_patch_demo.py
-
-::
-
- import numpy as np
- import matplotlib.path as mpath
- import matplotlib.patches as mpatches
- import matplotlib.pyplot as plt
-
- Path = mpath.Path
-
- fig = plt.figure()
- ax = fig.add_subplot(111)
-
- pathdata = [
- (Path.MOVETO, (1.58, -2.57)),
- (Path.CURVE4, (0.35, -1.1)),
- (Path.CURVE4, (-1.75, 2.0)),
- (Path.CURVE4, (0.375, 2.0)),
- (Path.LINETO, (0.85, 1.15)),
- (Path.CURVE4, (2.2, 3.2)),
- (Path.CURVE4, (3, 0.05)),
- (Path.CURVE4, (2.0, -0.5)),
- (Path.CLOSEPOLY, (1.58, -2.57)),
- ]
-
- codes, verts = zip(*pathdata)
- path = mpath.Path(verts, codes)
- patch = mpatches.PathPatch(path, facecolor='red', edgecolor='yellow', alpha=0.5)
- ax.add_patch(patch)
-
- x, y = zip(*path.vertices)
- line, = ax.plot(x, y, 'go-')
- ax.grid()
- ax.set_xlim(-3,4)
- ax.set_ylim(-3,4)
- ax.set_title('spline paths')
- plt.show()
-
-
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/power_norm_demo.rst.txt b/_sources/examples/api/power_norm_demo.rst.txt
deleted file mode 100644
index 7f584e9a58c..00000000000
--- a/_sources/examples/api/power_norm_demo.rst.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-.. _api-power_norm_demo:
-
-api example code: power_norm_demo.py
-====================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/power_norm_demo.py
-
-::
-
- """
- ========================
- Exploring normalizations
- ========================
-
- Let's explore various normalization on a multivariate normal distribution.
-
- """
-
- from matplotlib import pyplot as plt
- import matplotlib.colors as mcolors
- import numpy as np
- from numpy.random import multivariate_normal
-
- data = np.vstack([
- multivariate_normal([10, 10], [[3, 2], [2, 3]], size=100000),
- multivariate_normal([30, 20], [[2, 3], [1, 3]], size=1000)
- ])
-
- gammas = [0.8, 0.5, 0.3]
-
- fig, axes = plt.subplots(nrows=2, ncols=2)
-
- axes[0, 0].set_title('Linear normalization')
- axes[0, 0].hist2d(data[:, 0], data[:, 1], bins=100)
-
- for ax, gamma in zip(axes.flat[1:], gammas):
- ax.set_title('Power law $(\gamma=%1.1f)$' % gamma)
- ax.hist2d(data[:, 0], data[:, 1],
- bins=100, norm=mcolors.PowerNorm(gamma))
-
- fig.tight_layout()
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/power_norm_demo.txt b/_sources/examples/api/power_norm_demo.txt
deleted file mode 100644
index ea5f7b2c8cd..00000000000
--- a/_sources/examples/api/power_norm_demo.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-.. _api-power_norm_demo:
-
-api example code: power_norm_demo.py
-====================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/power_norm_demo.py
-
-::
-
- #!/usr/bin/python
-
- from matplotlib import pyplot as plt
- import matplotlib.colors as mcolors
- import numpy as np
- from numpy.random import multivariate_normal
-
- data = np.vstack([multivariate_normal([10, 10], [[2, 2], [2, 2]], size=100000),
- multivariate_normal([30, 20], [[2, 3], [1, 3]], size=1000)
- ])
-
- gammas = [0.8, 0.5, 0.3]
- xgrid = np.floor((len(gammas) + 1.) / 2)
- ygrid = np.ceil((len(gammas) + 1.) / 2)
-
- plt.subplot(xgrid, ygrid, 1)
- plt.title('Linear normalization')
- plt.hist2d(data[:, 0], data[:, 1], bins=100)
-
- for i, gamma in enumerate(gammas):
- plt.subplot(xgrid, ygrid, i + 2)
- plt.title('Power law normalization\n$(\gamma=%1.1f)$' % gamma)
- plt.hist2d(data[:, 0], data[:, 1],
- bins=100, norm=mcolors.PowerNorm(gamma))
-
- plt.subplots_adjust(hspace=0.39)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/quad_bezier.rst.txt b/_sources/examples/api/quad_bezier.rst.txt
deleted file mode 100644
index f5e185dbee2..00000000000
--- a/_sources/examples/api/quad_bezier.rst.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-.. _api-quad_bezier:
-
-api example code: quad_bezier.py
-================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/quad_bezier.py
-
-::
-
- """
- ============
- Bezier Curve
- ============
-
- This example showcases the PathPatch object to create a Bezier polycurve path
- patch.
- """
-
- import matplotlib.path as mpath
- import matplotlib.patches as mpatches
- import matplotlib.pyplot as plt
-
- Path = mpath.Path
-
- fig, ax = plt.subplots()
- pp1 = mpatches.PathPatch(
- Path([(0, 0), (1, 0), (1, 1), (0, 0)],
- [Path.MOVETO, Path.CURVE3, Path.CURVE3, Path.CLOSEPOLY]),
- fc="none", transform=ax.transData)
-
- ax.add_patch(pp1)
- ax.plot([0.75], [0.25], "ro")
- ax.set_title('The red point should be on the path')
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/quad_bezier.txt b/_sources/examples/api/quad_bezier.txt
deleted file mode 100644
index 7ad96d59d7a..00000000000
--- a/_sources/examples/api/quad_bezier.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-.. _api-quad_bezier:
-
-api example code: quad_bezier.py
-================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/quad_bezier.py
-
-::
-
- import matplotlib.path as mpath
- import matplotlib.patches as mpatches
- import matplotlib.pyplot as plt
-
- Path = mpath.Path
-
- fig, ax = plt.subplots()
- pp1 = mpatches.PathPatch(
- Path([(0, 0), (1, 0), (1, 1), (0, 0)],
- [Path.MOVETO, Path.CURVE3, Path.CURVE3, Path.CLOSEPOLY]),
- fc="none", transform=ax.transData)
-
- ax.add_patch(pp1)
- ax.plot([0.75], [0.25], "ro")
- ax.set_title('The red point should be on the path')
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/radar_chart.rst.txt b/_sources/examples/api/radar_chart.rst.txt
deleted file mode 100644
index c785418b7b2..00000000000
--- a/_sources/examples/api/radar_chart.rst.txt
+++ /dev/null
@@ -1,215 +0,0 @@
-.. _api-radar_chart:
-
-api example code: radar_chart.py
-================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/radar_chart.py
-
-::
-
- """
- ======================================
- Radar chart (aka spider or star chart)
- ======================================
-
- This example creates a radar chart, also known as a spider or star chart [1]_.
-
- Although this example allows a frame of either 'circle' or 'polygon', polygon
- frames don't have proper gridlines (the lines are circles instead of polygons).
- It's possible to get a polygon grid by setting GRIDLINE_INTERPOLATION_STEPS in
- matplotlib.axis to the desired number of vertices, but the orientation of the
- polygon is not aligned with the radial axes.
-
- .. [1] http://en.wikipedia.org/wiki/Radar_chart
- """
- import numpy as np
-
- import matplotlib.pyplot as plt
- from matplotlib.path import Path
- from matplotlib.spines import Spine
- from matplotlib.projections.polar import PolarAxes
- from matplotlib.projections import register_projection
-
-
- def radar_factory(num_vars, frame='circle'):
- """Create a radar chart with `num_vars` axes.
-
- This function creates a RadarAxes projection and registers it.
-
- Parameters
- ----------
- num_vars : int
- Number of variables for radar chart.
- frame : {'circle' | 'polygon'}
- Shape of frame surrounding axes.
-
- """
- # calculate evenly-spaced axis angles
- theta = np.linspace(0, 2*np.pi, num_vars, endpoint=False)
- # rotate theta such that the first axis is at the top
- theta += np.pi/2
-
- def draw_poly_patch(self):
- verts = unit_poly_verts(theta)
- return plt.Polygon(verts, closed=True, edgecolor='k')
-
- def draw_circle_patch(self):
- # unit circle centered on (0.5, 0.5)
- return plt.Circle((0.5, 0.5), 0.5)
-
- patch_dict = {'polygon': draw_poly_patch, 'circle': draw_circle_patch}
- if frame not in patch_dict:
- raise ValueError('unknown value for `frame`: %s' % frame)
-
- class RadarAxes(PolarAxes):
-
- name = 'radar'
- # use 1 line segment to connect specified points
- RESOLUTION = 1
- # define draw_frame method
- draw_patch = patch_dict[frame]
-
- def fill(self, *args, **kwargs):
- """Override fill so that line is closed by default"""
- closed = kwargs.pop('closed', True)
- return super(RadarAxes, self).fill(closed=closed, *args, **kwargs)
-
- def plot(self, *args, **kwargs):
- """Override plot so that line is closed by default"""
- lines = super(RadarAxes, self).plot(*args, **kwargs)
- for line in lines:
- self._close_line(line)
-
- def _close_line(self, line):
- x, y = line.get_data()
- # FIXME: markers at x[0], y[0] get doubled-up
- if x[0] != x[-1]:
- x = np.concatenate((x, [x[0]]))
- y = np.concatenate((y, [y[0]]))
- line.set_data(x, y)
-
- def set_varlabels(self, labels):
- self.set_thetagrids(np.degrees(theta), labels)
-
- def _gen_axes_patch(self):
- return self.draw_patch()
-
- def _gen_axes_spines(self):
- if frame == 'circle':
- return PolarAxes._gen_axes_spines(self)
- # The following is a hack to get the spines (i.e. the axes frame)
- # to draw correctly for a polygon frame.
-
- # spine_type must be 'left', 'right', 'top', 'bottom', or `circle`.
- spine_type = 'circle'
- verts = unit_poly_verts(theta)
- # close off polygon by repeating first vertex
- verts.append(verts[0])
- path = Path(verts)
-
- spine = Spine(self, spine_type, path)
- spine.set_transform(self.transAxes)
- return {'polar': spine}
-
- register_projection(RadarAxes)
- return theta
-
-
- def unit_poly_verts(theta):
- """Return vertices of polygon for subplot axes.
-
- This polygon is circumscribed by a unit circle centered at (0.5, 0.5)
- """
- x0, y0, r = [0.5] * 3
- verts = [(r*np.cos(t) + x0, r*np.sin(t) + y0) for t in theta]
- return verts
-
-
- def example_data():
- # The following data is from the Denver Aerosol Sources and Health study.
- # See doi:10.1016/j.atmosenv.2008.12.017
- #
- # The data are pollution source profile estimates for five modeled
- # pollution sources (e.g., cars, wood-burning, etc) that emit 7-9 chemical
- # species. The radar charts are experimented with here to see if we can
- # nicely visualize how the modeled source profiles change across four
- # scenarios:
- # 1) No gas-phase species present, just seven particulate counts on
- # Sulfate
- # Nitrate
- # Elemental Carbon (EC)
- # Organic Carbon fraction 1 (OC)
- # Organic Carbon fraction 2 (OC2)
- # Organic Carbon fraction 3 (OC3)
- # Pyrolized Organic Carbon (OP)
- # 2)Inclusion of gas-phase specie carbon monoxide (CO)
- # 3)Inclusion of gas-phase specie ozone (O3).
- # 4)Inclusion of both gas-phase species is present...
- data = [
- ['Sulfate', 'Nitrate', 'EC', 'OC1', 'OC2', 'OC3', 'OP', 'CO', 'O3'],
- ('Basecase', [
- [0.88, 0.01, 0.03, 0.03, 0.00, 0.06, 0.01, 0.00, 0.00],
- [0.07, 0.95, 0.04, 0.05, 0.00, 0.02, 0.01, 0.00, 0.00],
- [0.01, 0.02, 0.85, 0.19, 0.05, 0.10, 0.00, 0.00, 0.00],
- [0.02, 0.01, 0.07, 0.01, 0.21, 0.12, 0.98, 0.00, 0.00],
- [0.01, 0.01, 0.02, 0.71, 0.74, 0.70, 0.00, 0.00, 0.00]]),
- ('With CO', [
- [0.88, 0.02, 0.02, 0.02, 0.00, 0.05, 0.00, 0.05, 0.00],
- [0.08, 0.94, 0.04, 0.02, 0.00, 0.01, 0.12, 0.04, 0.00],
- [0.01, 0.01, 0.79, 0.10, 0.00, 0.05, 0.00, 0.31, 0.00],
- [0.00, 0.02, 0.03, 0.38, 0.31, 0.31, 0.00, 0.59, 0.00],
- [0.02, 0.02, 0.11, 0.47, 0.69, 0.58, 0.88, 0.00, 0.00]]),
- ('With O3', [
- [0.89, 0.01, 0.07, 0.00, 0.00, 0.05, 0.00, 0.00, 0.03],
- [0.07, 0.95, 0.05, 0.04, 0.00, 0.02, 0.12, 0.00, 0.00],
- [0.01, 0.02, 0.86, 0.27, 0.16, 0.19, 0.00, 0.00, 0.00],
- [0.01, 0.03, 0.00, 0.32, 0.29, 0.27, 0.00, 0.00, 0.95],
- [0.02, 0.00, 0.03, 0.37, 0.56, 0.47, 0.87, 0.00, 0.00]]),
- ('CO & O3', [
- [0.87, 0.01, 0.08, 0.00, 0.00, 0.04, 0.00, 0.00, 0.01],
- [0.09, 0.95, 0.02, 0.03, 0.00, 0.01, 0.13, 0.06, 0.00],
- [0.01, 0.02, 0.71, 0.24, 0.13, 0.16, 0.00, 0.50, 0.00],
- [0.01, 0.03, 0.00, 0.28, 0.24, 0.23, 0.00, 0.44, 0.88],
- [0.02, 0.00, 0.18, 0.45, 0.64, 0.55, 0.86, 0.00, 0.16]])
- ]
- return data
-
-
- if __name__ == '__main__':
- N = 9
- theta = radar_factory(N, frame='polygon')
-
- data = example_data()
- spoke_labels = data.pop(0)
-
- fig, axes = plt.subplots(figsize=(9, 9), nrows=2, ncols=2,
- subplot_kw=dict(projection='radar'))
- fig.subplots_adjust(wspace=0.25, hspace=0.20, top=0.85, bottom=0.05)
-
- colors = ['b', 'r', 'g', 'm', 'y']
- # Plot the four cases from the example data on separate axes
- for ax, (title, case_data) in zip(axes.flatten(), data):
- ax.set_rgrids([0.2, 0.4, 0.6, 0.8])
- ax.set_title(title, weight='bold', size='medium', position=(0.5, 1.1),
- horizontalalignment='center', verticalalignment='center')
- for d, color in zip(case_data, colors):
- ax.plot(theta, d, color=color)
- ax.fill(theta, d, facecolor=color, alpha=0.25)
- ax.set_varlabels(spoke_labels)
-
- # add legend relative to top-left plot
- ax = axes[0, 0]
- labels = ('Factor 1', 'Factor 2', 'Factor 3', 'Factor 4', 'Factor 5')
- legend = ax.legend(labels, loc=(0.9, .95),
- labelspacing=0.1, fontsize='small')
-
- fig.text(0.5, 0.965, '5-Factor Solution Profiles Across Four Scenarios',
- horizontalalignment='center', color='black', weight='bold',
- size='large')
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/radar_chart.txt b/_sources/examples/api/radar_chart.txt
deleted file mode 100644
index 57283541b8d..00000000000
--- a/_sources/examples/api/radar_chart.txt
+++ /dev/null
@@ -1,209 +0,0 @@
-.. _api-radar_chart:
-
-api example code: radar_chart.py
-================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/radar_chart.py
-
-::
-
- """
- Example of creating a radar chart (a.k.a. a spider or star chart) [1]_.
-
- Although this example allows a frame of either 'circle' or 'polygon', polygon
- frames don't have proper gridlines (the lines are circles instead of polygons).
- It's possible to get a polygon grid by setting GRIDLINE_INTERPOLATION_STEPS in
- matplotlib.axis to the desired number of vertices, but the orientation of the
- polygon is not aligned with the radial axes.
-
- .. [1] http://en.wikipedia.org/wiki/Radar_chart
- """
- import numpy as np
-
- import matplotlib.pyplot as plt
- from matplotlib.path import Path
- from matplotlib.spines import Spine
- from matplotlib.projections.polar import PolarAxes
- from matplotlib.projections import register_projection
-
-
- def radar_factory(num_vars, frame='circle'):
- """Create a radar chart with `num_vars` axes.
-
- This function creates a RadarAxes projection and registers it.
-
- Parameters
- ----------
- num_vars : int
- Number of variables for radar chart.
- frame : {'circle' | 'polygon'}
- Shape of frame surrounding axes.
-
- """
- # calculate evenly-spaced axis angles
- theta = np.linspace(0, 2*np.pi, num_vars, endpoint=False)
- # rotate theta such that the first axis is at the top
- theta += np.pi/2
-
- def draw_poly_patch(self):
- verts = unit_poly_verts(theta)
- return plt.Polygon(verts, closed=True, edgecolor='k')
-
- def draw_circle_patch(self):
- # unit circle centered on (0.5, 0.5)
- return plt.Circle((0.5, 0.5), 0.5)
-
- patch_dict = {'polygon': draw_poly_patch, 'circle': draw_circle_patch}
- if frame not in patch_dict:
- raise ValueError('unknown value for `frame`: %s' % frame)
-
- class RadarAxes(PolarAxes):
-
- name = 'radar'
- # use 1 line segment to connect specified points
- RESOLUTION = 1
- # define draw_frame method
- draw_patch = patch_dict[frame]
-
- def fill(self, *args, **kwargs):
- """Override fill so that line is closed by default"""
- closed = kwargs.pop('closed', True)
- return super(RadarAxes, self).fill(closed=closed, *args, **kwargs)
-
- def plot(self, *args, **kwargs):
- """Override plot so that line is closed by default"""
- lines = super(RadarAxes, self).plot(*args, **kwargs)
- for line in lines:
- self._close_line(line)
-
- def _close_line(self, line):
- x, y = line.get_data()
- # FIXME: markers at x[0], y[0] get doubled-up
- if x[0] != x[-1]:
- x = np.concatenate((x, [x[0]]))
- y = np.concatenate((y, [y[0]]))
- line.set_data(x, y)
-
- def set_varlabels(self, labels):
- self.set_thetagrids(np.degrees(theta), labels)
-
- def _gen_axes_patch(self):
- return self.draw_patch()
-
- def _gen_axes_spines(self):
- if frame == 'circle':
- return PolarAxes._gen_axes_spines(self)
- # The following is a hack to get the spines (i.e. the axes frame)
- # to draw correctly for a polygon frame.
-
- # spine_type must be 'left', 'right', 'top', 'bottom', or `circle`.
- spine_type = 'circle'
- verts = unit_poly_verts(theta)
- # close off polygon by repeating first vertex
- verts.append(verts[0])
- path = Path(verts)
-
- spine = Spine(self, spine_type, path)
- spine.set_transform(self.transAxes)
- return {'polar': spine}
-
- register_projection(RadarAxes)
- return theta
-
-
- def unit_poly_verts(theta):
- """Return vertices of polygon for subplot axes.
-
- This polygon is circumscribed by a unit circle centered at (0.5, 0.5)
- """
- x0, y0, r = [0.5] * 3
- verts = [(r*np.cos(t) + x0, r*np.sin(t) + y0) for t in theta]
- return verts
-
-
- def example_data():
- # The following data is from the Denver Aerosol Sources and Health study.
- # See doi:10.1016/j.atmosenv.2008.12.017
- #
- # The data are pollution source profile estimates for five modeled
- # pollution sources (e.g., cars, wood-burning, etc) that emit 7-9 chemical
- # species. The radar charts are experimented with here to see if we can
- # nicely visualize how the modeled source profiles change across four
- # scenarios:
- # 1) No gas-phase species present, just seven particulate counts on
- # Sulfate
- # Nitrate
- # Elemental Carbon (EC)
- # Organic Carbon fraction 1 (OC)
- # Organic Carbon fraction 2 (OC2)
- # Organic Carbon fraction 3 (OC3)
- # Pyrolized Organic Carbon (OP)
- # 2)Inclusion of gas-phase specie carbon monoxide (CO)
- # 3)Inclusion of gas-phase specie ozone (O3).
- # 4)Inclusion of both gas-phase speciesis present...
- data = [
- ['Sulfate', 'Nitrate', 'EC', 'OC1', 'OC2', 'OC3', 'OP', 'CO', 'O3'],
- ('Basecase', [
- [0.88, 0.01, 0.03, 0.03, 0.00, 0.06, 0.01, 0.00, 0.00],
- [0.07, 0.95, 0.04, 0.05, 0.00, 0.02, 0.01, 0.00, 0.00],
- [0.01, 0.02, 0.85, 0.19, 0.05, 0.10, 0.00, 0.00, 0.00],
- [0.02, 0.01, 0.07, 0.01, 0.21, 0.12, 0.98, 0.00, 0.00],
- [0.01, 0.01, 0.02, 0.71, 0.74, 0.70, 0.00, 0.00, 0.00]]),
- ('With CO', [
- [0.88, 0.02, 0.02, 0.02, 0.00, 0.05, 0.00, 0.05, 0.00],
- [0.08, 0.94, 0.04, 0.02, 0.00, 0.01, 0.12, 0.04, 0.00],
- [0.01, 0.01, 0.79, 0.10, 0.00, 0.05, 0.00, 0.31, 0.00],
- [0.00, 0.02, 0.03, 0.38, 0.31, 0.31, 0.00, 0.59, 0.00],
- [0.02, 0.02, 0.11, 0.47, 0.69, 0.58, 0.88, 0.00, 0.00]]),
- ('With O3', [
- [0.89, 0.01, 0.07, 0.00, 0.00, 0.05, 0.00, 0.00, 0.03],
- [0.07, 0.95, 0.05, 0.04, 0.00, 0.02, 0.12, 0.00, 0.00],
- [0.01, 0.02, 0.86, 0.27, 0.16, 0.19, 0.00, 0.00, 0.00],
- [0.01, 0.03, 0.00, 0.32, 0.29, 0.27, 0.00, 0.00, 0.95],
- [0.02, 0.00, 0.03, 0.37, 0.56, 0.47, 0.87, 0.00, 0.00]]),
- ('CO & O3', [
- [0.87, 0.01, 0.08, 0.00, 0.00, 0.04, 0.00, 0.00, 0.01],
- [0.09, 0.95, 0.02, 0.03, 0.00, 0.01, 0.13, 0.06, 0.00],
- [0.01, 0.02, 0.71, 0.24, 0.13, 0.16, 0.00, 0.50, 0.00],
- [0.01, 0.03, 0.00, 0.28, 0.24, 0.23, 0.00, 0.44, 0.88],
- [0.02, 0.00, 0.18, 0.45, 0.64, 0.55, 0.86, 0.00, 0.16]])
- ]
- return data
-
-
- if __name__ == '__main__':
- N = 9
- theta = radar_factory(N, frame='polygon')
-
- data = example_data()
- spoke_labels = data.pop(0)
-
- fig = plt.figure(figsize=(9, 9))
- fig.subplots_adjust(wspace=0.25, hspace=0.20, top=0.85, bottom=0.05)
-
- colors = ['b', 'r', 'g', 'm', 'y']
- # Plot the four cases from the example data on separate axes
- for n, (title, case_data) in enumerate(data):
- ax = fig.add_subplot(2, 2, n + 1, projection='radar')
- plt.rgrids([0.2, 0.4, 0.6, 0.8])
- ax.set_title(title, weight='bold', size='medium', position=(0.5, 1.1),
- horizontalalignment='center', verticalalignment='center')
- for d, color in zip(case_data, colors):
- ax.plot(theta, d, color=color)
- ax.fill(theta, d, facecolor=color, alpha=0.25)
- ax.set_varlabels(spoke_labels)
-
- # add legend relative to top-left plot
- plt.subplot(2, 2, 1)
- labels = ('Factor 1', 'Factor 2', 'Factor 3', 'Factor 4', 'Factor 5')
- legend = plt.legend(labels, loc=(0.9, .95), labelspacing=0.1)
- plt.setp(legend.get_texts(), fontsize='small')
-
- plt.figtext(0.5, 0.965, '5-Factor Solution Profiles Across Four Scenarios',
- ha='center', color='black', weight='bold', size='large')
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/sankey_demo.txt b/_sources/examples/api/sankey_demo.txt
deleted file mode 100644
index 1ae0a9de60d..00000000000
--- a/_sources/examples/api/sankey_demo.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-.. _api-sankey_demo:
-
-api example code: sankey_demo.py
-================================
-
-
-
-.. plot:: /home/darren/Projects/matplotlib/doc/mpl_examples/api/sankey_demo.py
-
-::
-
- #!/usr/bin/env python
-
- __author__ = "Yannick Copin "
- __version__ = "Time-stamp: <10/02/2010 16:49 ycopin@lyopc548.in2p3.fr>"
-
- import numpy as N
-
- def sankey(ax,
- outputs=[100.], outlabels=None,
- inputs=[100.], inlabels='',
- dx=40, dy=10, outangle=45, w=3, inangle=30, offset=2, **kwargs):
- """Draw a Sankey diagram.
-
- outputs: array of outputs, should sum up to 100%
- outlabels: output labels (same length as outputs),
- or None (use default labels) or '' (no labels)
- inputs and inlabels: similar for inputs
- dx: horizontal elongation
- dy: vertical elongation
- outangle: output arrow angle [deg]
- w: output arrow shoulder
- inangle: input dip angle
- offset: text offset
- **kwargs: propagated to Patch (e.g. fill=False)
-
- Return (patch,[intexts,outtexts])."""
-
- import matplotlib.patches as mpatches
- from matplotlib.path import Path
-
- outs = N.absolute(outputs)
- outsigns = N.sign(outputs)
- outsigns[-1] = 0 # Last output
-
- ins = N.absolute(inputs)
- insigns = N.sign(inputs)
- insigns[0] = 0 # First input
-
- assert sum(outs)==100, "Outputs don't sum up to 100%"
- assert sum(ins)==100, "Inputs don't sum up to 100%"
-
- def add_output(path, loss, sign=1):
- h = (loss/2+w)*N.tan(outangle/180.*N.pi) # Arrow tip height
- move,(x,y) = path[-1] # Use last point as reference
- if sign==0: # Final loss (horizontal)
- path.extend([(Path.LINETO,[x+dx,y]),
- (Path.LINETO,[x+dx,y+w]),
- (Path.LINETO,[x+dx+h,y-loss/2]), # Tip
- (Path.LINETO,[x+dx,y-loss-w]),
- (Path.LINETO,[x+dx,y-loss])])
- outtips.append((sign,path[-3][1]))
- else: # Intermediate loss (vertical)
- path.extend([(Path.CURVE4,[x+dx/2,y]),
- (Path.CURVE4,[x+dx,y]),
- (Path.CURVE4,[x+dx,y+sign*dy]),
- (Path.LINETO,[x+dx-w,y+sign*dy]),
- (Path.LINETO,[x+dx+loss/2,y+sign*(dy+h)]), # Tip
- (Path.LINETO,[x+dx+loss+w,y+sign*dy]),
- (Path.LINETO,[x+dx+loss,y+sign*dy]),
- (Path.CURVE3,[x+dx+loss,y-sign*loss]),
- (Path.CURVE3,[x+dx/2+loss,y-sign*loss])])
- outtips.append((sign,path[-5][1]))
-
- def add_input(path, gain, sign=1):
- h = (gain/2)*N.tan(inangle/180.*N.pi) # Dip depth
- move,(x,y) = path[-1] # Use last point as reference
- if sign==0: # First gain (horizontal)
- path.extend([(Path.LINETO,[x-dx,y]),
- (Path.LINETO,[x-dx+h,y+gain/2]), # Dip
- (Path.LINETO,[x-dx,y+gain])])
- xd,yd = path[-2][1] # Dip position
- indips.append((sign,[xd-h,yd]))
- else: # Intermediate gain (vertical)
- path.extend([(Path.CURVE4,[x-dx/2,y]),
- (Path.CURVE4,[x-dx,y]),
- (Path.CURVE4,[x-dx,y+sign*dy]),
- (Path.LINETO,[x-dx-gain/2,y+sign*(dy-h)]), # Dip
- (Path.LINETO,[x-dx-gain,y+sign*dy]),
- (Path.CURVE3,[x-dx-gain,y-sign*gain]),
- (Path.CURVE3,[x-dx/2-gain,y-sign*gain])])
- xd,yd = path[-4][1] # Dip position
- indips.append((sign,[xd,yd+sign*h]))
-
- outtips = [] # Output arrow tip dir. and positions
- urpath = [(Path.MOVETO,[0,100])] # 1st point of upper right path
- lrpath = [(Path.LINETO,[0,0])] # 1st point of lower right path
- for loss,sign in zip(outs,outsigns):
- add_output(sign>=0 and urpath or lrpath, loss, sign=sign)
-
- indips = [] # Input arrow tip dir. and positions
- llpath = [(Path.LINETO,[0,0])] # 1st point of lower left path
- ulpath = [(Path.MOVETO,[0,100])] # 1st point of upper left path
- for gain,sign in zip(ins,insigns)[::-1]:
- add_input(sign<=0 and llpath or ulpath, gain, sign=sign)
-
- def revert(path):
- """A path is not just revertable by path[::-1] because of Bezier
- curves."""
- rpath = []
- nextmove = Path.LINETO
- for move,pos in path[::-1]:
- rpath.append((nextmove,pos))
- nextmove = move
- return rpath
-
- # Concatenate subpathes in correct order
- path = urpath + revert(lrpath) + llpath + revert(ulpath)
-
- codes,verts = zip(*path)
- verts = N.array(verts)
-
- # Path patch
- path = Path(verts,codes)
- patch = mpatches.PathPatch(path, **kwargs)
- ax.add_patch(patch)
-
- if False: # DEBUG
- print "urpath", urpath
- print "lrpath", revert(lrpath)
- print "llpath", llpath
- print "ulpath", revert(ulpath)
-
- xs,ys = zip(*verts)
- ax.plot(xs,ys,'go-')
-
- # Labels
-
- def set_labels(labels,values):
- """Set or check labels according to values."""
- if labels=='': # No labels
- return labels
- elif labels is None: # Default labels
- return [ '%2d%%' % val for val in values ]
- else:
- assert len(labels)==len(values)
- return labels
-
- def put_labels(labels,positions,output=True):
- """Put labels to positions."""
- texts = []
- lbls = output and labels or labels[::-1]
- for i,label in enumerate(lbls):
- s,(x,y) = positions[i] # Label direction and position
- if s==0:
- t = ax.text(x+offset,y,label,
- ha=output and 'left' or 'right', va='center')
- elif s>0:
- t = ax.text(x,y+offset,label, ha='center', va='bottom')
- else:
- t = ax.text(x,y-offset,label, ha='center', va='top')
- texts.append(t)
- return texts
-
- outlabels = set_labels(outlabels, outs)
- outtexts = put_labels(outlabels, outtips, output=True)
-
- inlabels = set_labels(inlabels, ins)
- intexts = put_labels(inlabels, indips, output=False)
-
- # Axes management
- ax.set_xlim(verts[:,0].min()-dx, verts[:,0].max()+dx)
- ax.set_ylim(verts[:,1].min()-dy, verts[:,1].max()+dy)
- ax.set_aspect('equal', adjustable='datalim')
-
- return patch,[intexts,outtexts]
-
- if __name__=='__main__':
-
- import matplotlib.pyplot as P
-
- outputs = [10.,-20.,5.,15.,-10.,40.]
- outlabels = ['First','Second','Third','Fourth','Fifth','Hurray!']
- outlabels = [ s+'\n%d%%' % abs(l) for l,s in zip(outputs,outlabels) ]
-
- inputs = [60.,-25.,15.]
-
- fig = P.figure()
- ax = fig.add_subplot(1,1,1, xticks=[],yticks=[],
- title="Sankey diagram"
- )
-
- patch,(intexts,outtexts) = sankey(ax, outputs=outputs, outlabels=outlabels,
- inputs=inputs, inlabels=None,
- fc='g', alpha=0.2)
- outtexts[1].set_color('r')
- outtexts[-1].set_fontweight('bold')
-
- P.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/sankey_demo_basics.rst.txt b/_sources/examples/api/sankey_demo_basics.rst.txt
deleted file mode 100644
index 8c759ce0e4b..00000000000
--- a/_sources/examples/api/sankey_demo_basics.rst.txt
+++ /dev/null
@@ -1,95 +0,0 @@
-.. _api-sankey_demo_basics:
-
-api example code: sankey_demo_basics.py
-=======================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/sankey_demo_basics.py
-
-::
-
- """
- ================
- The Sankey class
- ================
-
- Demonstrate the Sankey class by producing three basic diagrams.
- """
- import numpy as np
- import matplotlib.pyplot as plt
-
- from matplotlib.sankey import Sankey
-
-
- # Example 1 -- Mostly defaults
- # This demonstrates how to create a simple diagram by implicitly calling the
- # Sankey.add() method and by appending finish() to the call to the class.
- Sankey(flows=[0.25, 0.15, 0.60, -0.20, -0.15, -0.05, -0.50, -0.10],
- labels=['', '', '', 'First', 'Second', 'Third', 'Fourth', 'Fifth'],
- orientations=[-1, 1, 0, 1, 1, 1, 0, -1]).finish()
- plt.title("The default settings produce a diagram like this.")
- # Notice:
- # 1. Axes weren't provided when Sankey() was instantiated, so they were
- # created automatically.
- # 2. The scale argument wasn't necessary since the data was already
- # normalized.
- # 3. By default, the lengths of the paths are justified.
-
- # Example 2
- # This demonstrates:
- # 1. Setting one path longer than the others
- # 2. Placing a label in the middle of the diagram
- # 3. Using the scale argument to normalize the flows
- # 4. Implicitly passing keyword arguments to PathPatch()
- # 5. Changing the angle of the arrow heads
- # 6. Changing the offset between the tips of the paths and their labels
- # 7. Formatting the numbers in the path labels and the associated unit
- # 8. Changing the appearance of the patch and the labels after the figure is
- # created
- fig = plt.figure()
- ax = fig.add_subplot(1, 1, 1, xticks=[], yticks=[],
- title="Flow Diagram of a Widget")
- sankey = Sankey(ax=ax, scale=0.01, offset=0.2, head_angle=180,
- format='%.0f', unit='%')
- sankey.add(flows=[25, 0, 60, -10, -20, -5, -15, -10, -40],
- labels=['', '', '', 'First', 'Second', 'Third', 'Fourth',
- 'Fifth', 'Hurray!'],
- orientations=[-1, 1, 0, 1, 1, 1, -1, -1, 0],
- pathlengths=[0.25, 0.25, 0.25, 0.25, 0.25, 0.6, 0.25, 0.25,
- 0.25],
- patchlabel="Widget\nA") # Arguments to matplotlib.patches.PathPatch()
- diagrams = sankey.finish()
- diagrams[0].texts[-1].set_color('r')
- diagrams[0].text.set_fontweight('bold')
- # Notice:
- # 1. Since the sum of the flows is nonzero, the width of the trunk isn't
- # uniform. If verbose.level is helpful (in matplotlibrc), a message is
- # given in the terminal window.
- # 2. The second flow doesn't appear because its value is zero. Again, if
- # verbose.level is helpful, a message is given in the terminal window.
-
- # Example 3
- # This demonstrates:
- # 1. Connecting two systems
- # 2. Turning off the labels of the quantities
- # 3. Adding a legend
- fig = plt.figure()
- ax = fig.add_subplot(1, 1, 1, xticks=[], yticks=[], title="Two Systems")
- flows = [0.25, 0.15, 0.60, -0.10, -0.05, -0.25, -0.15, -0.10, -0.35]
- sankey = Sankey(ax=ax, unit=None)
- sankey.add(flows=flows, label='one',
- orientations=[-1, 1, 0, 1, 1, 1, -1, -1, 0])
- sankey.add(flows=[-0.25, 0.15, 0.1], label='two',
- orientations=[-1, -1, -1], prior=0, connect=(0, 0))
- diagrams = sankey.finish()
- diagrams[-1].patch.set_hatch('/')
- plt.legend(loc='best')
- # Notice that only one connection is specified, but the systems form a
- # circuit since: (1) the lengths of the paths are justified and (2) the
- # orientation and ordering of the flows is mirrored.
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/sankey_demo_basics.txt b/_sources/examples/api/sankey_demo_basics.txt
deleted file mode 100644
index 084dd2c46a4..00000000000
--- a/_sources/examples/api/sankey_demo_basics.txt
+++ /dev/null
@@ -1,92 +0,0 @@
-.. _api-sankey_demo_basics:
-
-api example code: sankey_demo_basics.py
-=======================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/sankey_demo_basics.py
-
-::
-
- """Demonstrate the Sankey class by producing three basic diagrams.
- """
- import numpy as np
- import matplotlib.pyplot as plt
-
- from matplotlib.sankey import Sankey
-
-
- # Example 1 -- Mostly defaults
- # This demonstrates how to create a simple diagram by implicitly calling the
- # Sankey.add() method and by appending finish() to the call to the class.
- Sankey(flows=[0.25, 0.15, 0.60, -0.20, -0.15, -0.05, -0.50, -0.10],
- labels=['', '', '', 'First', 'Second', 'Third', 'Fourth', 'Fifth'],
- orientations=[-1, 1, 0, 1, 1, 1, 0, -1]).finish()
- plt.title("The default settings produce a diagram like this.")
- # Notice:
- # 1. Axes weren't provided when Sankey() was instantiated, so they were
- # created automatically.
- # 2. The scale argument wasn't necessary since the data was already
- # normalized.
- # 3. By default, the lengths of the paths are justified.
-
- # Example 2
- # This demonstrates:
- # 1. Setting one path longer than the others
- # 2. Placing a label in the middle of the diagram
- # 3. Using the scale argument to normalize the flows
- # 4. Implicitly passing keyword arguments to PathPatch()
- # 5. Changing the angle of the arrow heads
- # 6. Changing the offset between the tips of the paths and their labels
- # 7. Formatting the numbers in the path labels and the associated unit
- # 8. Changing the appearance of the patch and the labels after the figure is
- # created
- fig = plt.figure()
- ax = fig.add_subplot(1, 1, 1, xticks=[], yticks=[],
- title="Flow Diagram of a Widget")
- sankey = Sankey(ax=ax, scale=0.01, offset=0.2, head_angle=180,
- format='%.0f', unit='%')
- sankey.add(flows=[25, 0, 60, -10, -20, -5, -15, -10, -40],
- labels=['', '', '', 'First', 'Second', 'Third', 'Fourth',
- 'Fifth', 'Hurray!'],
- orientations=[-1, 1, 0, 1, 1, 1, -1, -1, 0],
- pathlengths=[0.25, 0.25, 0.25, 0.25, 0.25, 0.6, 0.25, 0.25,
- 0.25],
- patchlabel="Widget\nA",
- alpha=0.2, lw=2.0) # Arguments to matplotlib.patches.PathPatch()
- diagrams = sankey.finish()
- diagrams[0].patch.set_facecolor('#37c959')
- diagrams[0].texts[-1].set_color('r')
- diagrams[0].text.set_fontweight('bold')
- # Notice:
- # 1. Since the sum of the flows is nonzero, the width of the trunk isn't
- # uniform. If verbose.level is helpful (in matplotlibrc), a message is
- # given in the terminal window.
- # 2. The second flow doesn't appear because its value is zero. Again, if
- # verbose.level is helpful, a message is given in the terminal window.
-
- # Example 3
- # This demonstrates:
- # 1. Connecting two systems
- # 2. Turning off the labels of the quantities
- # 3. Adding a legend
- fig = plt.figure()
- ax = fig.add_subplot(1, 1, 1, xticks=[], yticks=[], title="Two Systems")
- flows = [0.25, 0.15, 0.60, -0.10, -0.05, -0.25, -0.15, -0.10, -0.35]
- sankey = Sankey(ax=ax, unit=None)
- sankey.add(flows=flows, label='one',
- orientations=[-1, 1, 0, 1, 1, 1, -1, -1, 0])
- sankey.add(flows=[-0.25, 0.15, 0.1], fc='#37c959', label='two',
- orientations=[-1, -1, -1], prior=0, connect=(0, 0))
- diagrams = sankey.finish()
- diagrams[-1].patch.set_hatch('/')
- plt.legend(loc='best')
- # Notice that only one connection is specified, but the systems form a
- # circuit since: (1) the lengths of the paths are justified and (2) the
- # orientation and ordering of the flows is mirrored.
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/sankey_demo_links.rst.txt b/_sources/examples/api/sankey_demo_links.rst.txt
deleted file mode 100644
index 731568f283e..00000000000
--- a/_sources/examples/api/sankey_demo_links.rst.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-.. _api-sankey_demo_links:
-
-api example code: sankey_demo_links.py
-======================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/sankey_demo_links.py
-
-::
-
- """
- ======================================
- Long chain of connections using Sankey
- ======================================
-
- Demonstrate/test the Sankey class by producing a long chain of connections.
- """
-
- from itertools import cycle
-
- import matplotlib.pyplot as plt
- from matplotlib.sankey import Sankey
-
- links_per_side = 6
-
-
- def side(sankey, n=1):
- """Generate a side chain."""
- prior = len(sankey.diagrams)
- for i in range(0, 2*n, 2):
- sankey.add(flows=[1, -1], orientations=[-1, -1],
- patchlabel=str(prior + i),
- prior=prior + i - 1, connect=(1, 0), alpha=0.5)
- sankey.add(flows=[1, -1], orientations=[1, 1],
- patchlabel=str(prior + i + 1),
- prior=prior + i, connect=(1, 0), alpha=0.5)
-
-
- def corner(sankey):
- """Generate a corner link."""
- prior = len(sankey.diagrams)
- sankey.add(flows=[1, -1], orientations=[0, 1],
- patchlabel=str(prior), facecolor='k',
- prior=prior - 1, connect=(1, 0), alpha=0.5)
-
-
- fig = plt.figure()
- ax = fig.add_subplot(1, 1, 1, xticks=[], yticks=[],
- title="Why would you want to do this?\n(But you could.)")
- sankey = Sankey(ax=ax, unit=None)
- sankey.add(flows=[1, -1], orientations=[0, 1],
- patchlabel="0", facecolor='k',
- rotation=45)
- side(sankey, n=links_per_side)
- corner(sankey)
- side(sankey, n=links_per_side)
- corner(sankey)
- side(sankey, n=links_per_side)
- corner(sankey)
- side(sankey, n=links_per_side)
- sankey.finish()
- # Notice:
- # 1. The alignment doesn't drift significantly (if at all; with 16007
- # subdiagrams there is still closure).
- # 2. The first diagram is rotated 45 deg, so all other diagrams are rotated
- # accordingly.
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/sankey_demo_links.txt b/_sources/examples/api/sankey_demo_links.txt
deleted file mode 100644
index f5dbd677351..00000000000
--- a/_sources/examples/api/sankey_demo_links.txt
+++ /dev/null
@@ -1,68 +0,0 @@
-.. _api-sankey_demo_links:
-
-api example code: sankey_demo_links.py
-======================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/sankey_demo_links.py
-
-::
-
- """Demonstrate/test the Sankey class by producing a long chain of connections.
- """
-
- from itertools import cycle
-
- import matplotlib.pyplot as plt
- from matplotlib.sankey import Sankey
-
- links_per_side = 6
-
-
- def side(sankey, n=1):
- """Generate a side chain."""
- prior = len(sankey.diagrams)
- colors = cycle(['orange', 'b', 'g', 'r', 'c', 'm', 'y'])
- for i in range(0, 2*n, 2):
- sankey.add(flows=[1, -1], orientations=[-1, -1],
- patchlabel=str(prior + i), facecolor=next(colors),
- prior=prior + i - 1, connect=(1, 0), alpha=0.5)
- sankey.add(flows=[1, -1], orientations=[1, 1],
- patchlabel=str(prior + i + 1), facecolor=next(colors),
- prior=prior + i, connect=(1, 0), alpha=0.5)
-
-
- def corner(sankey):
- """Generate a corner link."""
- prior = len(sankey.diagrams)
- sankey.add(flows=[1, -1], orientations=[0, 1],
- patchlabel=str(prior), facecolor='k',
- prior=prior - 1, connect=(1, 0), alpha=0.5)
-
-
- fig = plt.figure()
- ax = fig.add_subplot(1, 1, 1, xticks=[], yticks=[],
- title="Why would you want to do this?\n(But you could.)")
- sankey = Sankey(ax=ax, unit=None)
- sankey.add(flows=[1, -1], orientations=[0, 1],
- patchlabel="0", facecolor='k',
- rotation=45)
- side(sankey, n=links_per_side)
- corner(sankey)
- side(sankey, n=links_per_side)
- corner(sankey)
- side(sankey, n=links_per_side)
- corner(sankey)
- side(sankey, n=links_per_side)
- sankey.finish()
- # Notice:
- # 1. The alignment doesn't drift significantly (if at all; with 16007
- # subdiagrams there is still closure).
- # 2. The first diagram is rotated 45 deg, so all other diagrams are rotated
- # accordingly.
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/sankey_demo_old.rst.txt b/_sources/examples/api/sankey_demo_old.rst.txt
deleted file mode 100644
index 5867e1e8f85..00000000000
--- a/_sources/examples/api/sankey_demo_old.rst.txt
+++ /dev/null
@@ -1,214 +0,0 @@
-.. _api-sankey_demo_old:
-
-api example code: sankey_demo_old.py
-====================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/sankey_demo_old.py
-
-::
-
- """
- ==========================
- Yet another Sankey diagram
- ==========================
-
- This example showcases a more complex sankey diagram.
- """
-
- from __future__ import print_function
-
- __author__ = "Yannick Copin "
- __version__ = "Time-stamp: <10/02/2010 16:49 ycopin@lyopc548.in2p3.fr>"
-
- import numpy as np
-
-
- def sankey(ax,
- outputs=[100.], outlabels=None,
- inputs=[100.], inlabels='',
- dx=40, dy=10, outangle=45, w=3, inangle=30, offset=2, **kwargs):
- """Draw a Sankey diagram.
-
- outputs: array of outputs, should sum up to 100%
- outlabels: output labels (same length as outputs),
- or None (use default labels) or '' (no labels)
- inputs and inlabels: similar for inputs
- dx: horizontal elongation
- dy: vertical elongation
- outangle: output arrow angle [deg]
- w: output arrow shoulder
- inangle: input dip angle
- offset: text offset
- **kwargs: propagated to Patch (e.g., fill=False)
-
- Return (patch,[intexts,outtexts]).
- """
- import matplotlib.patches as mpatches
- from matplotlib.path import Path
-
- outs = np.absolute(outputs)
- outsigns = np.sign(outputs)
- outsigns[-1] = 0 # Last output
-
- ins = np.absolute(inputs)
- insigns = np.sign(inputs)
- insigns[0] = 0 # First input
-
- assert sum(outs) == 100, "Outputs don't sum up to 100%"
- assert sum(ins) == 100, "Inputs don't sum up to 100%"
-
- def add_output(path, loss, sign=1):
- # Arrow tip height
- h = (loss/2 + w) * np.tan(np.radians(outangle))
- move, (x, y) = path[-1] # Use last point as reference
- if sign == 0: # Final loss (horizontal)
- path.extend([(Path.LINETO, [x + dx, y]),
- (Path.LINETO, [x + dx, y + w]),
- (Path.LINETO, [x + dx + h, y - loss/2]), # Tip
- (Path.LINETO, [x + dx, y - loss - w]),
- (Path.LINETO, [x + dx, y - loss])])
- outtips.append((sign, path[-3][1]))
- else: # Intermediate loss (vertical)
- path.extend([(Path.CURVE4, [x + dx/2, y]),
- (Path.CURVE4, [x + dx, y]),
- (Path.CURVE4, [x + dx, y + sign*dy]),
- (Path.LINETO, [x + dx - w, y + sign*dy]),
- # Tip
- (Path.LINETO, [
- x + dx + loss/2, y + sign*(dy + h)]),
- (Path.LINETO, [x + dx + loss + w, y + sign*dy]),
- (Path.LINETO, [x + dx + loss, y + sign*dy]),
- (Path.CURVE3, [x + dx + loss, y - sign*loss]),
- (Path.CURVE3, [x + dx/2 + loss, y - sign*loss])])
- outtips.append((sign, path[-5][1]))
-
- def add_input(path, gain, sign=1):
- h = (gain / 2) * np.tan(np.radians(inangle)) # Dip depth
- move, (x, y) = path[-1] # Use last point as reference
- if sign == 0: # First gain (horizontal)
- path.extend([(Path.LINETO, [x - dx, y]),
- (Path.LINETO, [x - dx + h, y + gain/2]), # Dip
- (Path.LINETO, [x - dx, y + gain])])
- xd, yd = path[-2][1] # Dip position
- indips.append((sign, [xd - h, yd]))
- else: # Intermediate gain (vertical)
- path.extend([(Path.CURVE4, [x - dx/2, y]),
- (Path.CURVE4, [x - dx, y]),
- (Path.CURVE4, [x - dx, y + sign*dy]),
- # Dip
- (Path.LINETO, [
- x - dx - gain / 2, y + sign*(dy - h)]),
- (Path.LINETO, [x - dx - gain, y + sign*dy]),
- (Path.CURVE3, [x - dx - gain, y - sign*gain]),
- (Path.CURVE3, [x - dx/2 - gain, y - sign*gain])])
- xd, yd = path[-4][1] # Dip position
- indips.append((sign, [xd, yd + sign*h]))
-
- outtips = [] # Output arrow tip dir. and positions
- urpath = [(Path.MOVETO, [0, 100])] # 1st point of upper right path
- lrpath = [(Path.LINETO, [0, 0])] # 1st point of lower right path
- for loss, sign in zip(outs, outsigns):
- add_output(sign >= 0 and urpath or lrpath, loss, sign=sign)
-
- indips = [] # Input arrow tip dir. and positions
- llpath = [(Path.LINETO, [0, 0])] # 1st point of lower left path
- ulpath = [(Path.MOVETO, [0, 100])] # 1st point of upper left path
- for gain, sign in reversed(list(zip(ins, insigns))):
- add_input(sign <= 0 and llpath or ulpath, gain, sign=sign)
-
- def revert(path):
- """A path is not just revertable by path[::-1] because of Bezier
- curves."""
- rpath = []
- nextmove = Path.LINETO
- for move, pos in path[::-1]:
- rpath.append((nextmove, pos))
- nextmove = move
- return rpath
-
- # Concatenate subpathes in correct order
- path = urpath + revert(lrpath) + llpath + revert(ulpath)
-
- codes, verts = zip(*path)
- verts = np.array(verts)
-
- # Path patch
- path = Path(verts, codes)
- patch = mpatches.PathPatch(path, **kwargs)
- ax.add_patch(patch)
-
- if False: # DEBUG
- print("urpath", urpath)
- print("lrpath", revert(lrpath))
- print("llpath", llpath)
- print("ulpath", revert(ulpath))
- xs, ys = zip(*verts)
- ax.plot(xs, ys, 'go-')
-
- # Labels
-
- def set_labels(labels, values):
- """Set or check labels according to values."""
- if labels == '': # No labels
- return labels
- elif labels is None: # Default labels
- return ['%2d%%' % val for val in values]
- else:
- assert len(labels) == len(values)
- return labels
-
- def put_labels(labels, positions, output=True):
- """Put labels to positions."""
- texts = []
- lbls = output and labels or labels[::-1]
- for i, label in enumerate(lbls):
- s, (x, y) = positions[i] # Label direction and position
- if s == 0:
- t = ax.text(x + offset, y, label,
- ha=output and 'left' or 'right', va='center')
- elif s > 0:
- t = ax.text(x, y + offset, label, ha='center', va='bottom')
- else:
- t = ax.text(x, y - offset, label, ha='center', va='top')
- texts.append(t)
- return texts
-
- outlabels = set_labels(outlabels, outs)
- outtexts = put_labels(outlabels, outtips, output=True)
-
- inlabels = set_labels(inlabels, ins)
- intexts = put_labels(inlabels, indips, output=False)
-
- # Axes management
- ax.set_xlim(verts[:, 0].min() - dx, verts[:, 0].max() + dx)
- ax.set_ylim(verts[:, 1].min() - dy, verts[:, 1].max() + dy)
- ax.set_aspect('equal', adjustable='datalim')
-
- return patch, [intexts, outtexts]
-
-
- if __name__ == '__main__':
-
- import matplotlib.pyplot as plt
-
- outputs = [10., -20., 5., 15., -10., 40.]
- outlabels = ['First', 'Second', 'Third', 'Fourth', 'Fifth', 'Hurray!']
- outlabels = [s + '\n%d%%' % abs(l) for l, s in zip(outputs, outlabels)]
-
- inputs = [60., -25., 15.]
-
- fig = plt.figure()
- ax = fig.add_subplot(1, 1, 1, xticks=[], yticks=[], title="Sankey diagram")
-
- patch, (intexts, outtexts) = sankey(ax, outputs=outputs,
- outlabels=outlabels, inputs=inputs,
- inlabels=None)
- outtexts[1].set_color('r')
- outtexts[-1].set_fontweight('bold')
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/sankey_demo_old.txt b/_sources/examples/api/sankey_demo_old.txt
deleted file mode 100644
index 8f4bb8d10f2..00000000000
--- a/_sources/examples/api/sankey_demo_old.txt
+++ /dev/null
@@ -1,208 +0,0 @@
-.. _api-sankey_demo_old:
-
-api example code: sankey_demo_old.py
-====================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/sankey_demo_old.py
-
-::
-
- #!/usr/bin/env python
-
- from __future__ import print_function
-
- __author__ = "Yannick Copin "
- __version__ = "Time-stamp: <10/02/2010 16:49 ycopin@lyopc548.in2p3.fr>"
-
- import numpy as np
-
-
- def sankey(ax,
- outputs=[100.], outlabels=None,
- inputs=[100.], inlabels='',
- dx=40, dy=10, outangle=45, w=3, inangle=30, offset=2, **kwargs):
- """Draw a Sankey diagram.
-
- outputs: array of outputs, should sum up to 100%
- outlabels: output labels (same length as outputs),
- or None (use default labels) or '' (no labels)
- inputs and inlabels: similar for inputs
- dx: horizontal elongation
- dy: vertical elongation
- outangle: output arrow angle [deg]
- w: output arrow shoulder
- inangle: input dip angle
- offset: text offset
- **kwargs: propagated to Patch (e.g., fill=False)
-
- Return (patch,[intexts,outtexts]).
- """
- import matplotlib.patches as mpatches
- from matplotlib.path import Path
-
- outs = np.absolute(outputs)
- outsigns = np.sign(outputs)
- outsigns[-1] = 0 # Last output
-
- ins = np.absolute(inputs)
- insigns = np.sign(inputs)
- insigns[0] = 0 # First input
-
- assert sum(outs) == 100, "Outputs don't sum up to 100%"
- assert sum(ins) == 100, "Inputs don't sum up to 100%"
-
- def add_output(path, loss, sign=1):
- # Arrow tip height
- h = (loss/2 + w) * np.tan(np.radians(outangle))
- move, (x, y) = path[-1] # Use last point as reference
- if sign == 0: # Final loss (horizontal)
- path.extend([(Path.LINETO, [x + dx, y]),
- (Path.LINETO, [x + dx, y + w]),
- (Path.LINETO, [x + dx + h, y - loss/2]), # Tip
- (Path.LINETO, [x + dx, y - loss - w]),
- (Path.LINETO, [x + dx, y - loss])])
- outtips.append((sign, path[-3][1]))
- else: # Intermediate loss (vertical)
- path.extend([(Path.CURVE4, [x + dx/2, y]),
- (Path.CURVE4, [x + dx, y]),
- (Path.CURVE4, [x + dx, y + sign*dy]),
- (Path.LINETO, [x + dx - w, y + sign*dy]),
- # Tip
- (Path.LINETO, [
- x + dx + loss/2, y + sign*(dy + h)]),
- (Path.LINETO, [x + dx + loss + w, y + sign*dy]),
- (Path.LINETO, [x + dx + loss, y + sign*dy]),
- (Path.CURVE3, [x + dx + loss, y - sign*loss]),
- (Path.CURVE3, [x + dx/2 + loss, y - sign*loss])])
- outtips.append((sign, path[-5][1]))
-
- def add_input(path, gain, sign=1):
- h = (gain / 2) * np.tan(np.radians(inangle)) # Dip depth
- move, (x, y) = path[-1] # Use last point as reference
- if sign == 0: # First gain (horizontal)
- path.extend([(Path.LINETO, [x - dx, y]),
- (Path.LINETO, [x - dx + h, y + gain/2]), # Dip
- (Path.LINETO, [x - dx, y + gain])])
- xd, yd = path[-2][1] # Dip position
- indips.append((sign, [xd - h, yd]))
- else: # Intermediate gain (vertical)
- path.extend([(Path.CURVE4, [x - dx/2, y]),
- (Path.CURVE4, [x - dx, y]),
- (Path.CURVE4, [x - dx, y + sign*dy]),
- # Dip
- (Path.LINETO, [
- x - dx - gain / 2, y + sign*(dy - h)]),
- (Path.LINETO, [x - dx - gain, y + sign*dy]),
- (Path.CURVE3, [x - dx - gain, y - sign*gain]),
- (Path.CURVE3, [x - dx/2 - gain, y - sign*gain])])
- xd, yd = path[-4][1] # Dip position
- indips.append((sign, [xd, yd + sign*h]))
-
- outtips = [] # Output arrow tip dir. and positions
- urpath = [(Path.MOVETO, [0, 100])] # 1st point of upper right path
- lrpath = [(Path.LINETO, [0, 0])] # 1st point of lower right path
- for loss, sign in zip(outs, outsigns):
- add_output(sign >= 0 and urpath or lrpath, loss, sign=sign)
-
- indips = [] # Input arrow tip dir. and positions
- llpath = [(Path.LINETO, [0, 0])] # 1st point of lower left path
- ulpath = [(Path.MOVETO, [0, 100])] # 1st point of upper left path
- for gain, sign in reversed(list(zip(ins, insigns))):
- add_input(sign <= 0 and llpath or ulpath, gain, sign=sign)
-
- def revert(path):
- """A path is not just revertable by path[::-1] because of Bezier
- curves."""
- rpath = []
- nextmove = Path.LINETO
- for move, pos in path[::-1]:
- rpath.append((nextmove, pos))
- nextmove = move
- return rpath
-
- # Concatenate subpathes in correct order
- path = urpath + revert(lrpath) + llpath + revert(ulpath)
-
- codes, verts = zip(*path)
- verts = np.array(verts)
-
- # Path patch
- path = Path(verts, codes)
- patch = mpatches.PathPatch(path, **kwargs)
- ax.add_patch(patch)
-
- if False: # DEBUG
- print("urpath", urpath)
- print("lrpath", revert(lrpath))
- print("llpath", llpath)
- print("ulpath", revert(ulpath))
- xs, ys = zip(*verts)
- ax.plot(xs, ys, 'go-')
-
- # Labels
-
- def set_labels(labels, values):
- """Set or check labels according to values."""
- if labels == '': # No labels
- return labels
- elif labels is None: # Default labels
- return ['%2d%%' % val for val in values]
- else:
- assert len(labels) == len(values)
- return labels
-
- def put_labels(labels, positions, output=True):
- """Put labels to positions."""
- texts = []
- lbls = output and labels or labels[::-1]
- for i, label in enumerate(lbls):
- s, (x, y) = positions[i] # Label direction and position
- if s == 0:
- t = ax.text(x + offset, y, label,
- ha=output and 'left' or 'right', va='center')
- elif s > 0:
- t = ax.text(x, y + offset, label, ha='center', va='bottom')
- else:
- t = ax.text(x, y - offset, label, ha='center', va='top')
- texts.append(t)
- return texts
-
- outlabels = set_labels(outlabels, outs)
- outtexts = put_labels(outlabels, outtips, output=True)
-
- inlabels = set_labels(inlabels, ins)
- intexts = put_labels(inlabels, indips, output=False)
-
- # Axes management
- ax.set_xlim(verts[:, 0].min() - dx, verts[:, 0].max() + dx)
- ax.set_ylim(verts[:, 1].min() - dy, verts[:, 1].max() + dy)
- ax.set_aspect('equal', adjustable='datalim')
-
- return patch, [intexts, outtexts]
-
-
- if __name__ == '__main__':
-
- import matplotlib.pyplot as plt
-
- outputs = [10., -20., 5., 15., -10., 40.]
- outlabels = ['First', 'Second', 'Third', 'Fourth', 'Fifth', 'Hurray!']
- outlabels = [s + '\n%d%%' % abs(l) for l, s in zip(outputs, outlabels)]
-
- inputs = [60., -25., 15.]
-
- fig = plt.figure()
- ax = fig.add_subplot(1, 1, 1, xticks=[], yticks=[], title="Sankey diagram")
-
- patch, (intexts, outtexts) = sankey(ax, outputs=outputs,
- outlabels=outlabels, inputs=inputs,
- inlabels=None, fc='g', alpha=0.2)
- outtexts[1].set_color('r')
- outtexts[-1].set_fontweight('bold')
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/sankey_demo_rankine.rst.txt b/_sources/examples/api/sankey_demo_rankine.rst.txt
deleted file mode 100644
index 28a8d0987a0..00000000000
--- a/_sources/examples/api/sankey_demo_rankine.rst.txt
+++ /dev/null
@@ -1,98 +0,0 @@
-.. _api-sankey_demo_rankine:
-
-api example code: sankey_demo_rankine.py
-========================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/sankey_demo_rankine.py
-
-::
-
- """
- ===================
- Rankine power cycle
- ===================
-
- Demonstrate the Sankey class with a practical example of a Rankine power
- cycle.
-
- """
- import matplotlib.pyplot as plt
-
- from matplotlib.sankey import Sankey
-
- fig = plt.figure(figsize=(8, 9))
- ax = fig.add_subplot(1, 1, 1, xticks=[], yticks=[],
- title="Rankine Power Cycle: Example 8.6 from Moran and "
- "Shapiro\n\x22Fundamentals of Engineering Thermodynamics "
- "\x22, 6th ed., 2008")
- Hdot = [260.431, 35.078, 180.794, 221.115, 22.700,
- 142.361, 10.193, 10.210, 43.670, 44.312,
- 68.631, 10.758, 10.758, 0.017, 0.642,
- 232.121, 44.559, 100.613, 132.168] # MW
- sankey = Sankey(ax=ax, format='%.3G', unit=' MW', gap=0.5, scale=1.0/Hdot[0])
- sankey.add(patchlabel='\n\nPump 1', rotation=90, facecolor='#37c959',
- flows=[Hdot[13], Hdot[6], -Hdot[7]],
- labels=['Shaft power', '', None],
- pathlengths=[0.4, 0.883, 0.25],
- orientations=[1, -1, 0])
- sankey.add(patchlabel='\n\nOpen\nheater', facecolor='#37c959',
- flows=[Hdot[11], Hdot[7], Hdot[4], -Hdot[8]],
- labels=[None, '', None, None],
- pathlengths=[0.25, 0.25, 1.93, 0.25],
- orientations=[1, 0, -1, 0], prior=0, connect=(2, 1))
- sankey.add(patchlabel='\n\nPump 2', facecolor='#37c959',
- flows=[Hdot[14], Hdot[8], -Hdot[9]],
- labels=['Shaft power', '', None],
- pathlengths=[0.4, 0.25, 0.25],
- orientations=[1, 0, 0], prior=1, connect=(3, 1))
- sankey.add(patchlabel='Closed\nheater', trunklength=2.914, fc='#37c959',
- flows=[Hdot[9], Hdot[1], -Hdot[11], -Hdot[10]],
- pathlengths=[0.25, 1.543, 0.25, 0.25],
- labels=['', '', None, None],
- orientations=[0, -1, 1, -1], prior=2, connect=(2, 0))
- sankey.add(patchlabel='Trap', facecolor='#37c959', trunklength=5.102,
- flows=[Hdot[11], -Hdot[12]],
- labels=['\n', None],
- pathlengths=[1.0, 1.01],
- orientations=[1, 1], prior=3, connect=(2, 0))
- sankey.add(patchlabel='Steam\ngenerator', facecolor='#ff5555',
- flows=[Hdot[15], Hdot[10], Hdot[2], -Hdot[3], -Hdot[0]],
- labels=['Heat rate', '', '', None, None],
- pathlengths=0.25,
- orientations=[1, 0, -1, -1, -1], prior=3, connect=(3, 1))
- sankey.add(patchlabel='\n\n\nTurbine 1', facecolor='#37c959',
- flows=[Hdot[0], -Hdot[16], -Hdot[1], -Hdot[2]],
- labels=['', None, None, None],
- pathlengths=[0.25, 0.153, 1.543, 0.25],
- orientations=[0, 1, -1, -1], prior=5, connect=(4, 0))
- sankey.add(patchlabel='\n\n\nReheat', facecolor='#37c959',
- flows=[Hdot[2], -Hdot[2]],
- labels=[None, None],
- pathlengths=[0.725, 0.25],
- orientations=[-1, 0], prior=6, connect=(3, 0))
- sankey.add(patchlabel='Turbine 2', trunklength=3.212, facecolor='#37c959',
- flows=[Hdot[3], Hdot[16], -Hdot[5], -Hdot[4], -Hdot[17]],
- labels=[None, 'Shaft power', None, '', 'Shaft power'],
- pathlengths=[0.751, 0.15, 0.25, 1.93, 0.25],
- orientations=[0, -1, 0, -1, 1], prior=6, connect=(1, 1))
- sankey.add(patchlabel='Condenser', facecolor='#58b1fa', trunklength=1.764,
- flows=[Hdot[5], -Hdot[18], -Hdot[6]],
- labels=['', 'Heat rate', None],
- pathlengths=[0.45, 0.25, 0.883],
- orientations=[-1, 1, 0], prior=8, connect=(2, 0))
- diagrams = sankey.finish()
- for diagram in diagrams:
- diagram.text.set_fontweight('bold')
- diagram.text.set_fontsize('10')
- for text in diagram.texts:
- text.set_fontsize('10')
- # Notice that the explicit connections are handled automatically, but the
- # implicit ones currently are not. The lengths of the paths and the trunks
- # must be adjusted manually, and that is a bit tricky.
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/sankey_demo_rankine.txt b/_sources/examples/api/sankey_demo_rankine.txt
deleted file mode 100644
index 2bfc2f6a365..00000000000
--- a/_sources/examples/api/sankey_demo_rankine.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-.. _api-sankey_demo_rankine:
-
-api example code: sankey_demo_rankine.py
-========================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/sankey_demo_rankine.py
-
-::
-
- """Demonstrate the Sankey class with a practicle example of a Rankine power
- cycle.
-
- """
- import matplotlib.pyplot as plt
-
- from matplotlib.sankey import Sankey
-
- fig = plt.figure(figsize=(8, 9))
- ax = fig.add_subplot(1, 1, 1, xticks=[], yticks=[],
- title="Rankine Power Cycle: Example 8.6 from Moran and "
- "Shapiro\n\x22Fundamentals of Engineering Thermodynamics "
- "\x22, 6th ed., 2008")
- Hdot = [260.431, 35.078, 180.794, 221.115, 22.700,
- 142.361, 10.193, 10.210, 43.670, 44.312,
- 68.631, 10.758, 10.758, 0.017, 0.642,
- 232.121, 44.559, 100.613, 132.168] # MW
- sankey = Sankey(ax=ax, format='%.3G', unit=' MW', gap=0.5, scale=1.0/Hdot[0])
- sankey.add(patchlabel='\n\nPump 1', rotation=90, facecolor='#37c959',
- flows=[Hdot[13], Hdot[6], -Hdot[7]],
- labels=['Shaft power', '', None],
- pathlengths=[0.4, 0.883, 0.25],
- orientations=[1, -1, 0])
- sankey.add(patchlabel='\n\nOpen\nheater', facecolor='#37c959',
- flows=[Hdot[11], Hdot[7], Hdot[4], -Hdot[8]],
- labels=[None, '', None, None],
- pathlengths=[0.25, 0.25, 1.93, 0.25],
- orientations=[1, 0, -1, 0], prior=0, connect=(2, 1))
- sankey.add(patchlabel='\n\nPump 2', facecolor='#37c959',
- flows=[Hdot[14], Hdot[8], -Hdot[9]],
- labels=['Shaft power', '', None],
- pathlengths=[0.4, 0.25, 0.25],
- orientations=[1, 0, 0], prior=1, connect=(3, 1))
- sankey.add(patchlabel='Closed\nheater', trunklength=2.914, fc='#37c959',
- flows=[Hdot[9], Hdot[1], -Hdot[11], -Hdot[10]],
- pathlengths=[0.25, 1.543, 0.25, 0.25],
- labels=['', '', None, None],
- orientations=[0, -1, 1, -1], prior=2, connect=(2, 0))
- sankey.add(patchlabel='Trap', facecolor='#37c959', trunklength=5.102,
- flows=[Hdot[11], -Hdot[12]],
- labels=['\n', None],
- pathlengths=[1.0, 1.01],
- orientations=[1, 1], prior=3, connect=(2, 0))
- sankey.add(patchlabel='Steam\ngenerator', facecolor='#ff5555',
- flows=[Hdot[15], Hdot[10], Hdot[2], -Hdot[3], -Hdot[0]],
- labels=['Heat rate', '', '', None, None],
- pathlengths=0.25,
- orientations=[1, 0, -1, -1, -1], prior=3, connect=(3, 1))
- sankey.add(patchlabel='\n\n\nTurbine 1', facecolor='#37c959',
- flows=[Hdot[0], -Hdot[16], -Hdot[1], -Hdot[2]],
- labels=['', None, None, None],
- pathlengths=[0.25, 0.153, 1.543, 0.25],
- orientations=[0, 1, -1, -1], prior=5, connect=(4, 0))
- sankey.add(patchlabel='\n\n\nReheat', facecolor='#37c959',
- flows=[Hdot[2], -Hdot[2]],
- labels=[None, None],
- pathlengths=[0.725, 0.25],
- orientations=[-1, 0], prior=6, connect=(3, 0))
- sankey.add(patchlabel='Turbine 2', trunklength=3.212, facecolor='#37c959',
- flows=[Hdot[3], Hdot[16], -Hdot[5], -Hdot[4], -Hdot[17]],
- labels=[None, 'Shaft power', None, '', 'Shaft power'],
- pathlengths=[0.751, 0.15, 0.25, 1.93, 0.25],
- orientations=[0, -1, 0, -1, 1], prior=6, connect=(1, 1))
- sankey.add(patchlabel='Condenser', facecolor='#58b1fa', trunklength=1.764,
- flows=[Hdot[5], -Hdot[18], -Hdot[6]],
- labels=['', 'Heat rate', None],
- pathlengths=[0.45, 0.25, 0.883],
- orientations=[-1, 1, 0], prior=8, connect=(2, 0))
- diagrams = sankey.finish()
- for diagram in diagrams:
- diagram.text.set_fontweight('bold')
- diagram.text.set_fontsize('10')
- for text in diagram.texts:
- text.set_fontsize('10')
- # Notice that the explicit connections are handled automatically, but the
- # implicit ones currently are not. The lengths of the paths and the trunks
- # must be adjusted manually, and that is a bit tricky.
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/scatter_piecharts.rst.txt b/_sources/examples/api/scatter_piecharts.rst.txt
deleted file mode 100644
index 9caef9b90dd..00000000000
--- a/_sources/examples/api/scatter_piecharts.rst.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-.. _api-scatter_piecharts:
-
-api example code: scatter_piecharts.py
-======================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/scatter_piecharts.py
-
-::
-
- """
- ===================================
- Scatter plot with pie chart markers
- ===================================
-
- This example makes custom 'pie charts' as the markers for a scatter plot.
-
- Thanks to Manuel Metz for the example
- """
- import math
- import numpy as np
- import matplotlib.pyplot as plt
-
- # first define the ratios
- r1 = 0.2 # 20%
- r2 = r1 + 0.4 # 40%
-
- # define some sizes of the scatter marker
- sizes = [60, 80, 120]
-
- # calculate the points of the first pie marker
- #
- # these are just the origin (0,0) +
- # some points on a circle cos,sin
- x = [0] + np.cos(np.linspace(0, 2*math.pi*r1, 10)).tolist()
- y = [0] + np.sin(np.linspace(0, 2*math.pi*r1, 10)).tolist()
-
- xy1 = list(zip(x, y))
- s1 = max(max(x), max(y))
-
- # ...
- x = [0] + np.cos(np.linspace(2*math.pi*r1, 2*math.pi*r2, 10)).tolist()
- y = [0] + np.sin(np.linspace(2*math.pi*r1, 2*math.pi*r2, 10)).tolist()
- xy2 = list(zip(x, y))
- s2 = max(max(x), max(y))
-
- x = [0] + np.cos(np.linspace(2*math.pi*r2, 2*math.pi, 10)).tolist()
- y = [0] + np.sin(np.linspace(2*math.pi*r2, 2*math.pi, 10)).tolist()
- xy3 = list(zip(x, y))
- s3 = max(max(x), max(y))
-
- fig, ax = plt.subplots()
- ax.scatter(np.arange(3), np.arange(3), marker=(xy1, 0),
- s=[s1*s1*_ for _ in sizes], facecolor='blue')
- ax.scatter(np.arange(3), np.arange(3), marker=(xy2, 0),
- s=[s2*s2*_ for _ in sizes], facecolor='green')
- ax.scatter(np.arange(3), np.arange(3), marker=(xy3, 0),
- s=[s3*s3*_ for _ in sizes], facecolor='red')
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/scatter_piecharts.txt b/_sources/examples/api/scatter_piecharts.txt
deleted file mode 100644
index b08d817399a..00000000000
--- a/_sources/examples/api/scatter_piecharts.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-.. _api-scatter_piecharts:
-
-api example code: scatter_piecharts.py
-======================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/scatter_piecharts.py
-
-::
-
- """
- This example makes custom 'pie charts' as the markers for a scatter plotqu
-
- Thanks to Manuel Metz for the example
- """
- import math
- import numpy as np
- import matplotlib.pyplot as plt
-
- # first define the ratios
- r1 = 0.2 # 20%
- r2 = r1 + 0.4 # 40%
-
- # define some sizes of the scatter marker
- sizes = [60, 80, 120]
-
- # calculate the points of the first pie marker
- #
- # these are just the origin (0,0) +
- # some points on a circle cos,sin
- x = [0] + np.cos(np.linspace(0, 2*math.pi*r1, 10)).tolist()
- y = [0] + np.sin(np.linspace(0, 2*math.pi*r1, 10)).tolist()
-
- xy1 = list(zip(x, y))
- s1 = max(max(x), max(y))
-
- # ...
- x = [0] + np.cos(np.linspace(2*math.pi*r1, 2*math.pi*r2, 10)).tolist()
- y = [0] + np.sin(np.linspace(2*math.pi*r1, 2*math.pi*r2, 10)).tolist()
- xy2 = list(zip(x, y))
- s2 = max(max(x), max(y))
-
- x = [0] + np.cos(np.linspace(2*math.pi*r2, 2*math.pi, 10)).tolist()
- y = [0] + np.sin(np.linspace(2*math.pi*r2, 2*math.pi, 10)).tolist()
- xy3 = list(zip(x, y))
- s3 = max(max(x), max(y))
-
- fig, ax = plt.subplots()
- ax.scatter(np.arange(3), np.arange(3), marker=(xy1, 0),
- s=[s1*s1*_ for _ in sizes], facecolor='blue')
- ax.scatter(np.arange(3), np.arange(3), marker=(xy2, 0),
- s=[s2*s2*_ for _ in sizes], facecolor='green')
- ax.scatter(np.arange(3), np.arange(3), marker=(xy3, 0),
- s=[s3*s3*_ for _ in sizes], facecolor='red')
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/skewt.rst.txt b/_sources/examples/api/skewt.rst.txt
deleted file mode 100644
index f48132acc17..00000000000
--- a/_sources/examples/api/skewt.rst.txt
+++ /dev/null
@@ -1,307 +0,0 @@
-.. _api-skewt:
-
-api example code: skewt.py
-==========================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/skewt.py
-
-::
-
- """
- ===========================================================
- SkewT-logP diagram: using transforms and custom projections
- ===========================================================
-
- This serves as an intensive exercise of matplotlib's transforms and custom
- projection API. This example produces a so-called SkewT-logP diagram, which is
- a common plot in meteorology for displaying vertical profiles of temperature.
- As far as matplotlib is concerned, the complexity comes from having X and Y
- axes that are not orthogonal. This is handled by including a skew component to
- the basic Axes transforms. Additional complexity comes in handling the fact
- that the upper and lower X-axes have different data ranges, which necessitates
- a bunch of custom classes for ticks,spines, and the axis to handle this.
-
- """
-
- from matplotlib.axes import Axes
- import matplotlib.transforms as transforms
- import matplotlib.axis as maxis
- import matplotlib.spines as mspines
- from matplotlib.projections import register_projection
-
-
- # The sole purpose of this class is to look at the upper, lower, or total
- # interval as appropriate and see what parts of the tick to draw, if any.
- class SkewXTick(maxis.XTick):
- def update_position(self, loc):
- # This ensures that the new value of the location is set before
- # any other updates take place
- self._loc = loc
- super(SkewXTick, self).update_position(loc)
-
- def _has_default_loc(self):
- return self.get_loc() is None
-
- def _need_lower(self):
- return (self._has_default_loc() or
- transforms.interval_contains(self.axes.lower_xlim,
- self.get_loc()))
-
- def _need_upper(self):
- return (self._has_default_loc() or
- transforms.interval_contains(self.axes.upper_xlim,
- self.get_loc()))
-
- @property
- def gridOn(self):
- return (self._gridOn and (self._has_default_loc() or
- transforms.interval_contains(self.get_view_interval(),
- self.get_loc())))
-
- @gridOn.setter
- def gridOn(self, value):
- self._gridOn = value
-
- @property
- def tick1On(self):
- return self._tick1On and self._need_lower()
-
- @tick1On.setter
- def tick1On(self, value):
- self._tick1On = value
-
- @property
- def label1On(self):
- return self._label1On and self._need_lower()
-
- @label1On.setter
- def label1On(self, value):
- self._label1On = value
-
- @property
- def tick2On(self):
- return self._tick2On and self._need_upper()
-
- @tick2On.setter
- def tick2On(self, value):
- self._tick2On = value
-
- @property
- def label2On(self):
- return self._label2On and self._need_upper()
-
- @label2On.setter
- def label2On(self, value):
- self._label2On = value
-
- def get_view_interval(self):
- return self.axes.xaxis.get_view_interval()
-
-
- # This class exists to provide two separate sets of intervals to the tick,
- # as well as create instances of the custom tick
- class SkewXAxis(maxis.XAxis):
- def _get_tick(self, major):
- return SkewXTick(self.axes, None, '', major=major)
-
- def get_view_interval(self):
- return self.axes.upper_xlim[0], self.axes.lower_xlim[1]
-
-
- # This class exists to calculate the separate data range of the
- # upper X-axis and draw the spine there. It also provides this range
- # to the X-axis artist for ticking and gridlines
- class SkewSpine(mspines.Spine):
- def _adjust_location(self):
- pts = self._path.vertices
- if self.spine_type == 'top':
- pts[:, 0] = self.axes.upper_xlim
- else:
- pts[:, 0] = self.axes.lower_xlim
-
-
- # This class handles registration of the skew-xaxes as a projection as well
- # as setting up the appropriate transformations. It also overrides standard
- # spines and axes instances as appropriate.
- class SkewXAxes(Axes):
- # The projection must specify a name. This will be used be the
- # user to select the projection, i.e. ``subplot(111,
- # projection='skewx')``.
- name = 'skewx'
-
- def _init_axis(self):
- # Taken from Axes and modified to use our modified X-axis
- self.xaxis = SkewXAxis(self)
- self.spines['top'].register_axis(self.xaxis)
- self.spines['bottom'].register_axis(self.xaxis)
- self.yaxis = maxis.YAxis(self)
- self.spines['left'].register_axis(self.yaxis)
- self.spines['right'].register_axis(self.yaxis)
-
- def _gen_axes_spines(self):
- spines = {'top': SkewSpine.linear_spine(self, 'top'),
- 'bottom': mspines.Spine.linear_spine(self, 'bottom'),
- 'left': mspines.Spine.linear_spine(self, 'left'),
- 'right': mspines.Spine.linear_spine(self, 'right')}
- return spines
-
- def _set_lim_and_transforms(self):
- """
- This is called once when the plot is created to set up all the
- transforms for the data, text and grids.
- """
- rot = 30
-
- # Get the standard transform setup from the Axes base class
- Axes._set_lim_and_transforms(self)
-
- # Need to put the skew in the middle, after the scale and limits,
- # but before the transAxes. This way, the skew is done in Axes
- # coordinates thus performing the transform around the proper origin
- # We keep the pre-transAxes transform around for other users, like the
- # spines for finding bounds
- self.transDataToAxes = self.transScale + \
- self.transLimits + transforms.Affine2D().skew_deg(rot, 0)
-
- # Create the full transform from Data to Pixels
- self.transData = self.transDataToAxes + self.transAxes
-
- # Blended transforms like this need to have the skewing applied using
- # both axes, in axes coords like before.
- self._xaxis_transform = (transforms.blended_transform_factory(
- self.transScale + self.transLimits,
- transforms.IdentityTransform()) +
- transforms.Affine2D().skew_deg(rot, 0)) + self.transAxes
-
- @property
- def lower_xlim(self):
- return self.axes.viewLim.intervalx
-
- @property
- def upper_xlim(self):
- pts = [[0., 1.], [1., 1.]]
- return self.transDataToAxes.inverted().transform(pts)[:, 0]
-
-
- # Now register the projection with matplotlib so the user can select
- # it.
- register_projection(SkewXAxes)
-
- if __name__ == '__main__':
- # Now make a simple example using the custom projection.
- from matplotlib.ticker import (MultipleLocator, NullFormatter,
- ScalarFormatter)
- import matplotlib.pyplot as plt
- from six import StringIO
- import numpy as np
-
- # Some examples data
- data_txt = '''
- 978.0 345 7.8 0.8 61 4.16 325 14 282.7 294.6 283.4
- 971.0 404 7.2 0.2 61 4.01 327 17 282.7 294.2 283.4
- 946.7 610 5.2 -1.8 61 3.56 335 26 282.8 293.0 283.4
- 944.0 634 5.0 -2.0 61 3.51 336 27 282.8 292.9 283.4
- 925.0 798 3.4 -2.6 65 3.43 340 32 282.8 292.7 283.4
- 911.8 914 2.4 -2.7 69 3.46 345 37 282.9 292.9 283.5
- 906.0 966 2.0 -2.7 71 3.47 348 39 283.0 293.0 283.6
- 877.9 1219 0.4 -3.2 77 3.46 0 48 283.9 293.9 284.5
- 850.0 1478 -1.3 -3.7 84 3.44 0 47 284.8 294.8 285.4
- 841.0 1563 -1.9 -3.8 87 3.45 358 45 285.0 295.0 285.6
- 823.0 1736 1.4 -0.7 86 4.44 353 42 290.3 303.3 291.0
- 813.6 1829 4.5 1.2 80 5.17 350 40 294.5 309.8 295.4
- 809.0 1875 6.0 2.2 77 5.57 347 39 296.6 313.2 297.6
- 798.0 1988 7.4 -0.6 57 4.61 340 35 299.2 313.3 300.1
- 791.0 2061 7.6 -1.4 53 4.39 335 33 300.2 313.6 301.0
- 783.9 2134 7.0 -1.7 54 4.32 330 31 300.4 313.6 301.2
- 755.1 2438 4.8 -3.1 57 4.06 300 24 301.2 313.7 301.9
- 727.3 2743 2.5 -4.4 60 3.81 285 29 301.9 313.8 302.6
- 700.5 3048 0.2 -5.8 64 3.57 275 31 302.7 313.8 303.3
- 700.0 3054 0.2 -5.8 64 3.56 280 31 302.7 313.8 303.3
- 698.0 3077 0.0 -6.0 64 3.52 280 31 302.7 313.7 303.4
- 687.0 3204 -0.1 -7.1 59 3.28 281 31 304.0 314.3 304.6
- 648.9 3658 -3.2 -10.9 55 2.59 285 30 305.5 313.8 305.9
- 631.0 3881 -4.7 -12.7 54 2.29 289 33 306.2 313.6 306.6
- 600.7 4267 -6.4 -16.7 44 1.73 295 39 308.6 314.3 308.9
- 592.0 4381 -6.9 -17.9 41 1.59 297 41 309.3 314.6 309.6
- 577.6 4572 -8.1 -19.6 39 1.41 300 44 310.1 314.9 310.3
- 555.3 4877 -10.0 -22.3 36 1.16 295 39 311.3 315.3 311.5
- 536.0 5151 -11.7 -24.7 33 0.97 304 39 312.4 315.8 312.6
- 533.8 5182 -11.9 -25.0 33 0.95 305 39 312.5 315.8 312.7
- 500.0 5680 -15.9 -29.9 29 0.64 290 44 313.6 315.9 313.7
- 472.3 6096 -19.7 -33.4 28 0.49 285 46 314.1 315.8 314.1
- 453.0 6401 -22.4 -36.0 28 0.39 300 50 314.4 315.8 314.4
- 400.0 7310 -30.7 -43.7 27 0.20 285 44 315.0 315.8 315.0
- 399.7 7315 -30.8 -43.8 27 0.20 285 44 315.0 315.8 315.0
- 387.0 7543 -33.1 -46.1 26 0.16 281 47 314.9 315.5 314.9
- 382.7 7620 -33.8 -46.8 26 0.15 280 48 315.0 315.6 315.0
- 342.0 8398 -40.5 -53.5 23 0.08 293 52 316.1 316.4 316.1
- 320.4 8839 -43.7 -56.7 22 0.06 300 54 317.6 317.8 317.6
- 318.0 8890 -44.1 -57.1 22 0.05 301 55 317.8 318.0 317.8
- 310.0 9060 -44.7 -58.7 19 0.04 304 61 319.2 319.4 319.2
- 306.1 9144 -43.9 -57.9 20 0.05 305 63 321.5 321.7 321.5
- 305.0 9169 -43.7 -57.7 20 0.05 303 63 322.1 322.4 322.1
- 300.0 9280 -43.5 -57.5 20 0.05 295 64 323.9 324.2 323.9
- 292.0 9462 -43.7 -58.7 17 0.05 293 67 326.2 326.4 326.2
- 276.0 9838 -47.1 -62.1 16 0.03 290 74 326.6 326.7 326.6
- 264.0 10132 -47.5 -62.5 16 0.03 288 79 330.1 330.3 330.1
- 251.0 10464 -49.7 -64.7 16 0.03 285 85 331.7 331.8 331.7
- 250.0 10490 -49.7 -64.7 16 0.03 285 85 332.1 332.2 332.1
- 247.0 10569 -48.7 -63.7 16 0.03 283 88 334.7 334.8 334.7
- 244.0 10649 -48.9 -63.9 16 0.03 280 91 335.6 335.7 335.6
- 243.3 10668 -48.9 -63.9 16 0.03 280 91 335.8 335.9 335.8
- 220.0 11327 -50.3 -65.3 15 0.03 280 85 343.5 343.6 343.5
- 212.0 11569 -50.5 -65.5 15 0.03 280 83 346.8 346.9 346.8
- 210.0 11631 -49.7 -64.7 16 0.03 280 83 349.0 349.1 349.0
- 200.0 11950 -49.9 -64.9 15 0.03 280 80 353.6 353.7 353.6
- 194.0 12149 -49.9 -64.9 15 0.03 279 78 356.7 356.8 356.7
- 183.0 12529 -51.3 -66.3 15 0.03 278 75 360.4 360.5 360.4
- 164.0 13233 -55.3 -68.3 18 0.02 277 69 365.2 365.3 365.2
- 152.0 13716 -56.5 -69.5 18 0.02 275 65 371.1 371.2 371.1
- 150.0 13800 -57.1 -70.1 18 0.02 275 64 371.5 371.6 371.5
- 136.0 14414 -60.5 -72.5 19 0.02 268 54 376.0 376.1 376.0
- 132.0 14600 -60.1 -72.1 19 0.02 265 51 380.0 380.1 380.0
- 131.4 14630 -60.2 -72.2 19 0.02 265 51 380.3 380.4 380.3
- 128.0 14792 -60.9 -72.9 19 0.02 266 50 381.9 382.0 381.9
- 125.0 14939 -60.1 -72.1 19 0.02 268 49 385.9 386.0 385.9
- 119.0 15240 -62.2 -73.8 20 0.01 270 48 387.4 387.5 387.4
- 112.0 15616 -64.9 -75.9 21 0.01 265 53 389.3 389.3 389.3
- 108.0 15838 -64.1 -75.1 21 0.01 265 58 394.8 394.9 394.8
- 107.8 15850 -64.1 -75.1 21 0.01 265 58 395.0 395.1 395.0
- 105.0 16010 -64.7 -75.7 21 0.01 272 50 396.9 396.9 396.9
- 103.0 16128 -62.9 -73.9 21 0.02 277 45 402.5 402.6 402.5
- 100.0 16310 -62.5 -73.5 21 0.02 285 36 406.7 406.8 406.7
- '''
-
- # Parse the data
- sound_data = StringIO(data_txt)
- p, h, T, Td = np.loadtxt(sound_data, usecols=range(0, 4), unpack=True)
-
- # Create a new figure. The dimensions here give a good aspect ratio
- fig = plt.figure(figsize=(6.5875, 6.2125))
- ax = fig.add_subplot(111, projection='skewx')
-
- plt.grid(True)
-
- # Plot the data using normal plotting functions, in this case using
- # log scaling in Y, as dictated by the typical meteorological plot
- ax.semilogy(T, p, color='C3')
- ax.semilogy(Td, p, color='C2')
-
- # An example of a slanted line at constant X
- l = ax.axvline(0, color='C0')
-
- # Disables the log-formatting that comes with semilogy
- ax.yaxis.set_major_formatter(ScalarFormatter())
- ax.yaxis.set_minor_formatter(NullFormatter())
- ax.set_yticks(np.linspace(100, 1000, 10))
- ax.set_ylim(1050, 100)
-
- ax.xaxis.set_major_locator(MultipleLocator(10))
- ax.set_xlim(-50, 50)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/skewt.txt b/_sources/examples/api/skewt.txt
deleted file mode 100644
index 89c60a12eea..00000000000
--- a/_sources/examples/api/skewt.txt
+++ /dev/null
@@ -1,269 +0,0 @@
-.. _api-skewt:
-
-api example code: skewt.py
-==========================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/skewt.py
-
-::
-
- # This serves as an intensive exercise of matplotlib's transforms
- # and custom projection API. This example produces a so-called
- # SkewT-logP diagram, which is a common plot in meteorology for
- # displaying vertical profiles of temperature. As far as matplotlib is
- # concerned, the complexity comes from having X and Y axes that are
- # not orthogonal. This is handled by including a skew component to the
- # basic Axes transforms. Additional complexity comes in handling the
- # fact that the upper and lower X-axes have different data ranges, which
- # necessitates a bunch of custom classes for ticks,spines, and the axis
- # to handle this.
-
- from matplotlib.axes import Axes
- import matplotlib.transforms as transforms
- import matplotlib.axis as maxis
- import matplotlib.spines as mspines
- import matplotlib.path as mpath
- from matplotlib.projections import register_projection
-
- # The sole purpose of this class is to look at the upper, lower, or total
- # interval as appropriate and see what parts of the tick to draw, if any.
-
-
- class SkewXTick(maxis.XTick):
- def draw(self, renderer):
- if not self.get_visible():
- return
- renderer.open_group(self.__name__)
-
- lower_interval = self.axes.xaxis.lower_interval
- upper_interval = self.axes.xaxis.upper_interval
-
- if self.gridOn and transforms.interval_contains(
- self.axes.xaxis.get_view_interval(), self.get_loc()):
- self.gridline.draw(renderer)
-
- if transforms.interval_contains(lower_interval, self.get_loc()):
- if self.tick1On:
- self.tick1line.draw(renderer)
- if self.label1On:
- self.label1.draw(renderer)
-
- if transforms.interval_contains(upper_interval, self.get_loc()):
- if self.tick2On:
- self.tick2line.draw(renderer)
- if self.label2On:
- self.label2.draw(renderer)
-
- renderer.close_group(self.__name__)
-
-
- # This class exists to provide two separate sets of intervals to the tick,
- # as well as create instances of the custom tick
- class SkewXAxis(maxis.XAxis):
- def __init__(self, *args, **kwargs):
- maxis.XAxis.__init__(self, *args, **kwargs)
- self.upper_interval = 0.0, 1.0
-
- def _get_tick(self, major):
- return SkewXTick(self.axes, 0, '', major=major)
-
- @property
- def lower_interval(self):
- return self.axes.viewLim.intervalx
-
- def get_view_interval(self):
- return self.upper_interval[0], self.axes.viewLim.intervalx[1]
-
-
- # This class exists to calculate the separate data range of the
- # upper X-axis and draw the spine there. It also provides this range
- # to the X-axis artist for ticking and gridlines
- class SkewSpine(mspines.Spine):
- def _adjust_location(self):
- trans = self.axes.transDataToAxes.inverted()
- if self.spine_type == 'top':
- yloc = 1.0
- else:
- yloc = 0.0
- left = trans.transform_point((0.0, yloc))[0]
- right = trans.transform_point((1.0, yloc))[0]
-
- pts = self._path.vertices
- pts[0, 0] = left
- pts[1, 0] = right
- self.axis.upper_interval = (left, right)
-
-
- # This class handles registration of the skew-xaxes as a projection as well
- # as setting up the appropriate transformations. It also overrides standard
- # spines and axes instances as appropriate.
- class SkewXAxes(Axes):
- # The projection must specify a name. This will be used be the
- # user to select the projection, i.e. ``subplot(111,
- # projection='skewx')``.
- name = 'skewx'
-
- def _init_axis(self):
- # Taken from Axes and modified to use our modified X-axis
- self.xaxis = SkewXAxis(self)
- self.spines['top'].register_axis(self.xaxis)
- self.spines['bottom'].register_axis(self.xaxis)
- self.yaxis = maxis.YAxis(self)
- self.spines['left'].register_axis(self.yaxis)
- self.spines['right'].register_axis(self.yaxis)
-
- def _gen_axes_spines(self):
- spines = {'top': SkewSpine.linear_spine(self, 'top'),
- 'bottom': mspines.Spine.linear_spine(self, 'bottom'),
- 'left': mspines.Spine.linear_spine(self, 'left'),
- 'right': mspines.Spine.linear_spine(self, 'right')}
- return spines
-
- def _set_lim_and_transforms(self):
- """
- This is called once when the plot is created to set up all the
- transforms for the data, text and grids.
- """
- rot = 30
-
- # Get the standard transform setup from the Axes base class
- Axes._set_lim_and_transforms(self)
-
- # Need to put the skew in the middle, after the scale and limits,
- # but before the transAxes. This way, the skew is done in Axes
- # coordinates thus performing the transform around the proper origin
- # We keep the pre-transAxes transform around for other users, like the
- # spines for finding bounds
- self.transDataToAxes = self.transScale + \
- self.transLimits + transforms.Affine2D().skew_deg(rot, 0)
-
- # Create the full transform from Data to Pixels
- self.transData = self.transDataToAxes + self.transAxes
-
- # Blended transforms like this need to have the skewing applied using
- # both axes, in axes coords like before.
- self._xaxis_transform = (transforms.blended_transform_factory(
- self.transScale + self.transLimits,
- transforms.IdentityTransform()) +
- transforms.Affine2D().skew_deg(rot, 0)) + self.transAxes
-
- # Now register the projection with matplotlib so the user can select
- # it.
- register_projection(SkewXAxes)
-
- if __name__ == '__main__':
- # Now make a simple example using the custom projection.
- from matplotlib.ticker import ScalarFormatter, MultipleLocator
- import matplotlib.pyplot as plt
- from six import StringIO
- import numpy as np
-
- # Some examples data
- data_txt = '''
- 978.0 345 7.8 0.8 61 4.16 325 14 282.7 294.6 283.4
- 971.0 404 7.2 0.2 61 4.01 327 17 282.7 294.2 283.4
- 946.7 610 5.2 -1.8 61 3.56 335 26 282.8 293.0 283.4
- 944.0 634 5.0 -2.0 61 3.51 336 27 282.8 292.9 283.4
- 925.0 798 3.4 -2.6 65 3.43 340 32 282.8 292.7 283.4
- 911.8 914 2.4 -2.7 69 3.46 345 37 282.9 292.9 283.5
- 906.0 966 2.0 -2.7 71 3.47 348 39 283.0 293.0 283.6
- 877.9 1219 0.4 -3.2 77 3.46 0 48 283.9 293.9 284.5
- 850.0 1478 -1.3 -3.7 84 3.44 0 47 284.8 294.8 285.4
- 841.0 1563 -1.9 -3.8 87 3.45 358 45 285.0 295.0 285.6
- 823.0 1736 1.4 -0.7 86 4.44 353 42 290.3 303.3 291.0
- 813.6 1829 4.5 1.2 80 5.17 350 40 294.5 309.8 295.4
- 809.0 1875 6.0 2.2 77 5.57 347 39 296.6 313.2 297.6
- 798.0 1988 7.4 -0.6 57 4.61 340 35 299.2 313.3 300.1
- 791.0 2061 7.6 -1.4 53 4.39 335 33 300.2 313.6 301.0
- 783.9 2134 7.0 -1.7 54 4.32 330 31 300.4 313.6 301.2
- 755.1 2438 4.8 -3.1 57 4.06 300 24 301.2 313.7 301.9
- 727.3 2743 2.5 -4.4 60 3.81 285 29 301.9 313.8 302.6
- 700.5 3048 0.2 -5.8 64 3.57 275 31 302.7 313.8 303.3
- 700.0 3054 0.2 -5.8 64 3.56 280 31 302.7 313.8 303.3
- 698.0 3077 0.0 -6.0 64 3.52 280 31 302.7 313.7 303.4
- 687.0 3204 -0.1 -7.1 59 3.28 281 31 304.0 314.3 304.6
- 648.9 3658 -3.2 -10.9 55 2.59 285 30 305.5 313.8 305.9
- 631.0 3881 -4.7 -12.7 54 2.29 289 33 306.2 313.6 306.6
- 600.7 4267 -6.4 -16.7 44 1.73 295 39 308.6 314.3 308.9
- 592.0 4381 -6.9 -17.9 41 1.59 297 41 309.3 314.6 309.6
- 577.6 4572 -8.1 -19.6 39 1.41 300 44 310.1 314.9 310.3
- 555.3 4877 -10.0 -22.3 36 1.16 295 39 311.3 315.3 311.5
- 536.0 5151 -11.7 -24.7 33 0.97 304 39 312.4 315.8 312.6
- 533.8 5182 -11.9 -25.0 33 0.95 305 39 312.5 315.8 312.7
- 500.0 5680 -15.9 -29.9 29 0.64 290 44 313.6 315.9 313.7
- 472.3 6096 -19.7 -33.4 28 0.49 285 46 314.1 315.8 314.1
- 453.0 6401 -22.4 -36.0 28 0.39 300 50 314.4 315.8 314.4
- 400.0 7310 -30.7 -43.7 27 0.20 285 44 315.0 315.8 315.0
- 399.7 7315 -30.8 -43.8 27 0.20 285 44 315.0 315.8 315.0
- 387.0 7543 -33.1 -46.1 26 0.16 281 47 314.9 315.5 314.9
- 382.7 7620 -33.8 -46.8 26 0.15 280 48 315.0 315.6 315.0
- 342.0 8398 -40.5 -53.5 23 0.08 293 52 316.1 316.4 316.1
- 320.4 8839 -43.7 -56.7 22 0.06 300 54 317.6 317.8 317.6
- 318.0 8890 -44.1 -57.1 22 0.05 301 55 317.8 318.0 317.8
- 310.0 9060 -44.7 -58.7 19 0.04 304 61 319.2 319.4 319.2
- 306.1 9144 -43.9 -57.9 20 0.05 305 63 321.5 321.7 321.5
- 305.0 9169 -43.7 -57.7 20 0.05 303 63 322.1 322.4 322.1
- 300.0 9280 -43.5 -57.5 20 0.05 295 64 323.9 324.2 323.9
- 292.0 9462 -43.7 -58.7 17 0.05 293 67 326.2 326.4 326.2
- 276.0 9838 -47.1 -62.1 16 0.03 290 74 326.6 326.7 326.6
- 264.0 10132 -47.5 -62.5 16 0.03 288 79 330.1 330.3 330.1
- 251.0 10464 -49.7 -64.7 16 0.03 285 85 331.7 331.8 331.7
- 250.0 10490 -49.7 -64.7 16 0.03 285 85 332.1 332.2 332.1
- 247.0 10569 -48.7 -63.7 16 0.03 283 88 334.7 334.8 334.7
- 244.0 10649 -48.9 -63.9 16 0.03 280 91 335.6 335.7 335.6
- 243.3 10668 -48.9 -63.9 16 0.03 280 91 335.8 335.9 335.8
- 220.0 11327 -50.3 -65.3 15 0.03 280 85 343.5 343.6 343.5
- 212.0 11569 -50.5 -65.5 15 0.03 280 83 346.8 346.9 346.8
- 210.0 11631 -49.7 -64.7 16 0.03 280 83 349.0 349.1 349.0
- 200.0 11950 -49.9 -64.9 15 0.03 280 80 353.6 353.7 353.6
- 194.0 12149 -49.9 -64.9 15 0.03 279 78 356.7 356.8 356.7
- 183.0 12529 -51.3 -66.3 15 0.03 278 75 360.4 360.5 360.4
- 164.0 13233 -55.3 -68.3 18 0.02 277 69 365.2 365.3 365.2
- 152.0 13716 -56.5 -69.5 18 0.02 275 65 371.1 371.2 371.1
- 150.0 13800 -57.1 -70.1 18 0.02 275 64 371.5 371.6 371.5
- 136.0 14414 -60.5 -72.5 19 0.02 268 54 376.0 376.1 376.0
- 132.0 14600 -60.1 -72.1 19 0.02 265 51 380.0 380.1 380.0
- 131.4 14630 -60.2 -72.2 19 0.02 265 51 380.3 380.4 380.3
- 128.0 14792 -60.9 -72.9 19 0.02 266 50 381.9 382.0 381.9
- 125.0 14939 -60.1 -72.1 19 0.02 268 49 385.9 386.0 385.9
- 119.0 15240 -62.2 -73.8 20 0.01 270 48 387.4 387.5 387.4
- 112.0 15616 -64.9 -75.9 21 0.01 265 53 389.3 389.3 389.3
- 108.0 15838 -64.1 -75.1 21 0.01 265 58 394.8 394.9 394.8
- 107.8 15850 -64.1 -75.1 21 0.01 265 58 395.0 395.1 395.0
- 105.0 16010 -64.7 -75.7 21 0.01 272 50 396.9 396.9 396.9
- 103.0 16128 -62.9 -73.9 21 0.02 277 45 402.5 402.6 402.5
- 100.0 16310 -62.5 -73.5 21 0.02 285 36 406.7 406.8 406.7
- '''
-
- # Parse the data
- sound_data = StringIO(data_txt)
- p, h, T, Td = np.loadtxt(sound_data, usecols=range(0, 4), unpack=True)
-
- # Create a new figure. The dimensions here give a good aspect ratio
- fig = plt.figure(figsize=(6.5875, 6.2125))
- ax = fig.add_subplot(111, projection='skewx')
-
- plt.grid(True)
-
- # Plot the data using normal plotting functions, in this case using
- # log scaling in Y, as dicatated by the typical meteorological plot
- ax.semilogy(T, p, 'r')
- ax.semilogy(Td, p, 'g')
-
- # An example of a slanted line at constant X
- l = ax.axvline(0, color='b')
-
- # Disables the log-formatting that comes with semilogy
- ax.yaxis.set_major_formatter(ScalarFormatter())
- ax.set_yticks(np.linspace(100, 1000, 10))
- ax.set_ylim(1050, 100)
-
- ax.xaxis.set_major_locator(MultipleLocator(10))
- ax.set_xlim(-50, 50)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/span_regions.rst.txt b/_sources/examples/api/span_regions.rst.txt
deleted file mode 100644
index 1af53d6274f..00000000000
--- a/_sources/examples/api/span_regions.rst.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-.. _api-span_regions:
-
-api example code: span_regions.py
-=================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/span_regions.py
-
-::
-
- """
- ================
- Using span_where
- ================
-
- Illustrate some helper functions for shading regions where a logical
- mask is True
-
- See :meth:`matplotlib.collections.BrokenBarHCollection.span_where`
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.collections as collections
-
-
- t = np.arange(0.0, 2, 0.01)
- s1 = np.sin(2*np.pi*t)
- s2 = 1.2*np.sin(4*np.pi*t)
-
-
- fig, ax = plt.subplots()
- ax.set_title('using span_where')
- ax.plot(t, s1, color='black')
- ax.axhline(0, color='black', lw=2)
-
- collection = collections.BrokenBarHCollection.span_where(
- t, ymin=0, ymax=1, where=s1 > 0, facecolor='green', alpha=0.5)
- ax.add_collection(collection)
-
- collection = collections.BrokenBarHCollection.span_where(
- t, ymin=-1, ymax=0, where=s1 < 0, facecolor='red', alpha=0.5)
- ax.add_collection(collection)
-
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/span_regions.txt b/_sources/examples/api/span_regions.txt
deleted file mode 100644
index f3aed4e9daf..00000000000
--- a/_sources/examples/api/span_regions.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-.. _api-span_regions:
-
-api example code: span_regions.py
-=================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/span_regions.py
-
-::
-
- """
- Illustrate some helper functions for shading regions where a logical
- mask is True
-
- See :meth:`matplotlib.collections.BrokenBarHCollection.span_where`
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.collections as collections
-
-
- t = np.arange(0.0, 2, 0.01)
- s1 = np.sin(2*np.pi*t)
- s2 = 1.2*np.sin(4*np.pi*t)
-
-
- fig, ax = plt.subplots()
- ax.set_title('using span_where')
- ax.plot(t, s1, color='black')
- ax.axhline(0, color='black', lw=2)
-
- collection = collections.BrokenBarHCollection.span_where(
- t, ymin=0, ymax=1, where=s1 > 0, facecolor='green', alpha=0.5)
- ax.add_collection(collection)
-
- collection = collections.BrokenBarHCollection.span_where(
- t, ymin=-1, ymax=0, where=s1 < 0, facecolor='red', alpha=0.5)
- ax.add_collection(collection)
-
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/two_scales.rst.txt b/_sources/examples/api/two_scales.rst.txt
deleted file mode 100644
index ed182958be1..00000000000
--- a/_sources/examples/api/two_scales.rst.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-.. _api-two_scales:
-
-api example code: two_scales.py
-===============================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/two_scales.py
-
-::
-
- """
- ===========================
- Plots with different scales
- ===========================
-
- Demonstrate how to do two plots on the same axes with different left and
- right scales.
-
- The trick is to use *two different axes* that share the same *x* axis.
- You can use separate `matplotlib.ticker` formatters and locators as
- desired since the two axes are independent.
-
- Such axes are generated by calling the `Axes.twinx` method. Likewise,
- `Axes.twiny` is available to generate axes that share a *y* axis but
- have different top and bottom scales.
-
- The twinx and twiny methods are also exposed as pyplot functions.
-
- """
-
- import numpy as np
- import matplotlib.pyplot as plt
-
- fig, ax1 = plt.subplots()
- t = np.arange(0.01, 10.0, 0.01)
- s1 = np.exp(t)
- ax1.plot(t, s1, 'b-')
- ax1.set_xlabel('time (s)')
- # Make the y-axis label, ticks and tick labels match the line color.
- ax1.set_ylabel('exp', color='b')
- ax1.tick_params('y', colors='b')
-
- ax2 = ax1.twinx()
- s2 = np.sin(2 * np.pi * t)
- ax2.plot(t, s2, 'r.')
- ax2.set_ylabel('sin', color='r')
- ax2.tick_params('y', colors='r')
-
- fig.tight_layout()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/two_scales.txt b/_sources/examples/api/two_scales.txt
deleted file mode 100644
index a129be6a576..00000000000
--- a/_sources/examples/api/two_scales.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-.. _api-two_scales:
-
-api example code: two_scales.py
-===============================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/two_scales.py
-
-::
-
- #!/usr/bin/env python
- """
-
- Demonstrate how to do two plots on the same axes with different left
- right scales.
-
-
- The trick is to use *2 different axes*. Turn the axes rectangular
- frame off on the 2nd axes to keep it from obscuring the first.
- Manually set the tick locs and labels as desired. You can use
- separate matplotlib.ticker formatters and locators as desired since
- the two axes are independent.
-
- This is achieved in the following example by calling the Axes.twinx()
- method, which performs this work. See the source of twinx() in
- axes.py for an example of how to do it for different x scales. (Hint:
- use the xaxis instance and call tick_bottom and tick_top in place of
- tick_left and tick_right.)
-
- The twinx and twiny methods are also exposed as pyplot functions.
-
- """
-
- import numpy as np
- import matplotlib.pyplot as plt
-
- fig, ax1 = plt.subplots()
- t = np.arange(0.01, 10.0, 0.01)
- s1 = np.exp(t)
- ax1.plot(t, s1, 'b-')
- ax1.set_xlabel('time (s)')
- # Make the y-axis label and tick labels match the line color.
- ax1.set_ylabel('exp', color='b')
- for tl in ax1.get_yticklabels():
- tl.set_color('b')
-
-
- ax2 = ax1.twinx()
- s2 = np.sin(2*np.pi*t)
- ax2.plot(t, s2, 'r.')
- ax2.set_ylabel('sin', color='r')
- for tl in ax2.get_yticklabels():
- tl.set_color('r')
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/unicode_minus.rst.txt b/_sources/examples/api/unicode_minus.rst.txt
deleted file mode 100644
index 5f58602fbb5..00000000000
--- a/_sources/examples/api/unicode_minus.rst.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-.. _api-unicode_minus:
-
-api example code: unicode_minus.py
-==================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/unicode_minus.py
-
-::
-
- """
- =============
- Unicode minus
- =============
-
- You can use the proper typesetting Unicode minus (see
- https://en.wikipedia.org/wiki/Plus_sign#Plus_sign) or the ASCII hyphen
- for minus, which some people prefer. The matplotlibrc param
- axes.unicode_minus controls the default behavior.
-
- The default is to use the Unicode minus.
- """
- import numpy as np
- import matplotlib
- import matplotlib.pyplot as plt
-
- matplotlib.rcParams['axes.unicode_minus'] = False
- fig, ax = plt.subplots()
- ax.plot(10*np.random.randn(100), 10*np.random.randn(100), 'o')
- ax.set_title('Using hyphen instead of Unicode minus')
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/unicode_minus.txt b/_sources/examples/api/unicode_minus.txt
deleted file mode 100644
index 3f7b348d7bd..00000000000
--- a/_sources/examples/api/unicode_minus.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-.. _api-unicode_minus:
-
-api example code: unicode_minus.py
-==================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/unicode_minus.py
-
-::
-
- """
- You can use the proper typesetting unicode minus (see
- http://en.wikipedia.org/wiki/Plus_sign#Plus_sign) or the ASCII hypen
- for minus, which some people prefer. The matplotlibrc param
- axes.unicode_minus controls the default behavior.
-
- The default is to use the unicode minus
- """
- import numpy as np
- import matplotlib
- import matplotlib.pyplot as plt
-
- matplotlib.rcParams['axes.unicode_minus'] = False
- fig, ax = plt.subplots()
- ax.plot(10*np.random.randn(100), 10*np.random.randn(100), 'o')
- ax.set_title('Using hypen instead of unicode minus')
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/watermark_image.rst.txt b/_sources/examples/api/watermark_image.rst.txt
deleted file mode 100644
index 2283fbef259..00000000000
--- a/_sources/examples/api/watermark_image.rst.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-.. _api-watermark_image:
-
-api example code: watermark_image.py
-====================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/watermark_image.py
-
-::
-
- """
- ===============
- Watermark image
- ===============
-
- Use a PNG file as a watermark
- """
- from __future__ import print_function
- import numpy as np
- import matplotlib.cbook as cbook
- import matplotlib.image as image
- import matplotlib.pyplot as plt
-
- datafile = cbook.get_sample_data('logo2.png', asfileobj=False)
- print('loading %s' % datafile)
- im = image.imread(datafile)
- im[:, :, -1] = 0.5 # set the alpha channel
-
- fig, ax = plt.subplots()
-
- ax.plot(np.random.rand(20), '-o', ms=20, lw=2, alpha=0.7, mfc='orange')
- ax.grid()
- fig.figimage(im, 10, 10, zorder=3)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/watermark_image.txt b/_sources/examples/api/watermark_image.txt
deleted file mode 100644
index b87edf8ecc2..00000000000
--- a/_sources/examples/api/watermark_image.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-.. _api-watermark_image:
-
-api example code: watermark_image.py
-====================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/watermark_image.py
-
-::
-
- """
- Use a PNG file as a watermark
- """
- from __future__ import print_function
- import numpy as np
- import matplotlib.cbook as cbook
- import matplotlib.image as image
- import matplotlib.pyplot as plt
-
- datafile = cbook.get_sample_data('logo2.png', asfileobj=False)
- print('loading %s' % datafile)
- im = image.imread(datafile)
- im[:, :, -1] = 0.5 # set the alpha channel
-
- fig, ax = plt.subplots()
-
- ax.plot(np.random.rand(20), '-o', ms=20, lw=2, alpha=0.7, mfc='orange')
- ax.grid()
- fig.figimage(im, 10, 10)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/watermark_text.rst.txt b/_sources/examples/api/watermark_text.rst.txt
deleted file mode 100644
index 8b1c9020f56..00000000000
--- a/_sources/examples/api/watermark_text.rst.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-.. _api-watermark_text:
-
-api example code: watermark_text.py
-===================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/api/watermark_text.py
-
-::
-
- """
- ==============
- Text watermark
- ==============
-
- Use a Text as a watermark
- """
- import numpy as np
- #import matplotlib
- #matplotlib.use('Agg')
-
- import matplotlib.pyplot as plt
-
- fig, ax = plt.subplots()
- ax.plot(np.random.rand(20), '-o', ms=20, lw=2, alpha=0.7, mfc='orange')
- ax.grid()
-
- # position bottom right
- fig.text(0.95, 0.05, 'Property of MPL',
- fontsize=50, color='gray',
- ha='right', va='bottom', alpha=0.5)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/api/watermark_text.txt b/_sources/examples/api/watermark_text.txt
deleted file mode 100644
index a4e16bbf410..00000000000
--- a/_sources/examples/api/watermark_text.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-.. _api-watermark_text:
-
-api example code: watermark_text.py
-===================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/api/watermark_text.py
-
-::
-
- """
- Use a Text as a watermark
- """
- import numpy as np
- #import matplotlib
- #matplotlib.use('Agg')
-
- import matplotlib.pyplot as plt
-
- fig, ax = plt.subplots()
- ax.plot(np.random.rand(20), '-o', ms=20, lw=2, alpha=0.7, mfc='orange')
- ax.grid()
-
- # position bottom right
- fig.text(0.95, 0.05, 'Property of MPL',
- fontsize=50, color='gray',
- ha='right', va='bottom', alpha=0.5)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_axes_divider.rst.txt b/_sources/examples/axes_grid/demo_axes_divider.rst.txt
deleted file mode 100644
index fbef2cfd2ab..00000000000
--- a/_sources/examples/axes_grid/demo_axes_divider.rst.txt
+++ /dev/null
@@ -1,142 +0,0 @@
-.. _axes_grid-demo_axes_divider:
-
-axes_grid example code: demo_axes_divider.py
-============================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/demo_axes_divider.py
-
-::
-
- import matplotlib.pyplot as plt
-
-
- def get_demo_image():
- import numpy as np
- from matplotlib.cbook import get_sample_data
- f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False)
- z = np.load(f)
- # z is a numpy array of 15x15
- return z, (-3, 4, -4, 3)
-
-
- def demo_simple_image(ax):
- Z, extent = get_demo_image()
-
- im = ax.imshow(Z, extent=extent, interpolation="nearest")
- cb = plt.colorbar(im)
- plt.setp(cb.ax.get_yticklabels(), visible=False)
-
-
- def demo_locatable_axes_hard(fig1):
-
- from mpl_toolkits.axes_grid1 \
- import SubplotDivider, LocatableAxes, Size
-
- divider = SubplotDivider(fig1, 2, 2, 2, aspect=True)
-
- # axes for image
- ax = LocatableAxes(fig1, divider.get_position())
-
- # axes for colorbar
- ax_cb = LocatableAxes(fig1, divider.get_position())
-
- h = [Size.AxesX(ax), # main axes
- Size.Fixed(0.05), # padding, 0.1 inch
- Size.Fixed(0.2), # colorbar, 0.3 inch
- ]
-
- v = [Size.AxesY(ax)]
-
- divider.set_horizontal(h)
- divider.set_vertical(v)
-
- ax.set_axes_locator(divider.new_locator(nx=0, ny=0))
- ax_cb.set_axes_locator(divider.new_locator(nx=2, ny=0))
-
- fig1.add_axes(ax)
- fig1.add_axes(ax_cb)
-
- ax_cb.axis["left"].toggle(all=False)
- ax_cb.axis["right"].toggle(ticks=True)
-
- Z, extent = get_demo_image()
-
- im = ax.imshow(Z, extent=extent, interpolation="nearest")
- plt.colorbar(im, cax=ax_cb)
- plt.setp(ax_cb.get_yticklabels(), visible=False)
-
-
- def demo_locatable_axes_easy(ax):
- from mpl_toolkits.axes_grid1 import make_axes_locatable
-
- divider = make_axes_locatable(ax)
-
- ax_cb = divider.new_horizontal(size="5%", pad=0.05)
- fig1 = ax.get_figure()
- fig1.add_axes(ax_cb)
-
- Z, extent = get_demo_image()
- im = ax.imshow(Z, extent=extent, interpolation="nearest")
-
- plt.colorbar(im, cax=ax_cb)
- ax_cb.yaxis.tick_right()
- for tl in ax_cb.get_yticklabels():
- tl.set_visible(False)
- ax_cb.yaxis.tick_right()
-
-
- def demo_images_side_by_side(ax):
- from mpl_toolkits.axes_grid1 import make_axes_locatable
-
- divider = make_axes_locatable(ax)
-
- Z, extent = get_demo_image()
- ax2 = divider.new_horizontal(size="100%", pad=0.05)
- fig1 = ax.get_figure()
- fig1.add_axes(ax2)
-
- ax.imshow(Z, extent=extent, interpolation="nearest")
- ax2.imshow(Z, extent=extent, interpolation="nearest")
- for tl in ax2.get_yticklabels():
- tl.set_visible(False)
-
-
- def demo():
-
- fig1 = plt.figure(1, (6, 6))
- fig1.clf()
-
- # PLOT 1
- # simple image & colorbar
- ax = fig1.add_subplot(2, 2, 1)
- demo_simple_image(ax)
-
- # PLOT 2
- # image and colorbar whose location is adjusted in the drawing time.
- # a hard way
-
- demo_locatable_axes_hard(fig1)
-
- # PLOT 3
- # image and colorbar whose location is adjusted in the drawing time.
- # a easy way
-
- ax = fig1.add_subplot(2, 2, 3)
- demo_locatable_axes_easy(ax)
-
- # PLOT 4
- # two images side by side with fixed padding.
-
- ax = fig1.add_subplot(2, 2, 4)
- demo_images_side_by_side(ax)
-
- plt.draw()
- plt.show()
-
-
- demo()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_axes_divider.txt b/_sources/examples/axes_grid/demo_axes_divider.txt
deleted file mode 100644
index 7bb1f75676f..00000000000
--- a/_sources/examples/axes_grid/demo_axes_divider.txt
+++ /dev/null
@@ -1,142 +0,0 @@
-.. _axes_grid-demo_axes_divider:
-
-axes_grid example code: demo_axes_divider.py
-============================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/demo_axes_divider.py
-
-::
-
- import matplotlib.pyplot as plt
-
-
- def get_demo_image():
- import numpy as np
- from matplotlib.cbook import get_sample_data
- f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False)
- z = np.load(f)
- # z is a numpy array of 15x15
- return z, (-3, 4, -4, 3)
-
-
- def demo_simple_image(ax):
- Z, extent = get_demo_image()
-
- im = ax.imshow(Z, extent=extent, interpolation="nearest")
- cb = plt.colorbar(im)
- plt.setp(cb.ax.get_yticklabels(), visible=False)
-
-
- def demo_locatable_axes_hard(fig1):
-
- from mpl_toolkits.axes_grid1 \
- import SubplotDivider, LocatableAxes, Size
-
- divider = SubplotDivider(fig1, 2, 2, 2, aspect=True)
-
- # axes for image
- ax = LocatableAxes(fig1, divider.get_position())
-
- # axes for colorbar
- ax_cb = LocatableAxes(fig1, divider.get_position())
-
- h = [Size.AxesX(ax), # main axes
- Size.Fixed(0.05), # padding, 0.1 inch
- Size.Fixed(0.2), # colorbar, 0.3 inch
- ]
-
- v = [Size.AxesY(ax)]
-
- divider.set_horizontal(h)
- divider.set_vertical(v)
-
- ax.set_axes_locator(divider.new_locator(nx=0, ny=0))
- ax_cb.set_axes_locator(divider.new_locator(nx=2, ny=0))
-
- fig1.add_axes(ax)
- fig1.add_axes(ax_cb)
-
- ax_cb.axis["left"].toggle(all=False)
- ax_cb.axis["right"].toggle(ticks=True)
-
- Z, extent = get_demo_image()
-
- im = ax.imshow(Z, extent=extent, interpolation="nearest")
- plt.colorbar(im, cax=ax_cb)
- plt.setp(ax_cb.get_yticklabels(), visible=False)
-
-
- def demo_locatable_axes_easy(ax):
- from mpl_toolkits.axes_grid1 import make_axes_locatable
-
- divider = make_axes_locatable(ax)
-
- ax_cb = divider.new_horizontal(size="5%", pad=0.05)
- fig1 = ax.get_figure()
- fig1.add_axes(ax_cb)
-
- Z, extent = get_demo_image()
- im = ax.imshow(Z, extent=extent, interpolation="nearest")
-
- plt.colorbar(im, cax=ax_cb)
- ax_cb.yaxis.tick_right()
- for tl in ax_cb.get_yticklabels():
- tl.set_visible(False)
- ax_cb.yaxis.tick_right()
-
-
- def demo_images_side_by_side(ax):
- from mpl_toolkits.axes_grid1 import make_axes_locatable
-
- divider = make_axes_locatable(ax)
-
- Z, extent = get_demo_image()
- ax2 = divider.new_horizontal(size="100%", pad=0.05)
- fig1 = ax.get_figure()
- fig1.add_axes(ax2)
-
- ax.imshow(Z, extent=extent, interpolation="nearest")
- ax2.imshow(Z, extent=extent, interpolation="nearest")
- for tl in ax2.get_yticklabels():
- tl.set_visible(False)
-
-
- def demo():
-
- fig1 = plt.figure(1, (6, 6))
- fig1.clf()
-
- # PLOT 1
- # simple image & colorbar
- ax = fig1.add_subplot(2, 2, 1)
- demo_simple_image(ax)
-
- # PLOT 2
- # image and colorbar whose location is adjusted in the drawing time.
- # a hard way
-
- demo_locatable_axes_hard(fig1)
-
- # PLOT 3
- # image and colorbar whose location is adjusted in the drawing time.
- # a easy way
-
- ax = fig1.add_subplot(2, 2, 3)
- demo_locatable_axes_easy(ax)
-
- # PLOT 4
- # two images side by side with fixed padding.
-
- ax = fig1.add_subplot(2, 2, 4)
- demo_images_side_by_side(ax)
-
- plt.draw()
- plt.show()
-
-
- demo()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_axes_grid.rst.txt b/_sources/examples/axes_grid/demo_axes_grid.rst.txt
deleted file mode 100644
index 7ae5f8d223e..00000000000
--- a/_sources/examples/axes_grid/demo_axes_grid.rst.txt
+++ /dev/null
@@ -1,147 +0,0 @@
-.. _axes_grid-demo_axes_grid:
-
-axes_grid example code: demo_axes_grid.py
-=========================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/demo_axes_grid.py
-
-::
-
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1 import AxesGrid
-
-
- def get_demo_image():
- import numpy as np
- from matplotlib.cbook import get_sample_data
- f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False)
- z = np.load(f)
- # z is a numpy array of 15x15
- return z, (-3, 4, -4, 3)
-
-
- def demo_simple_grid(fig):
- """
- A grid of 2x2 images with 0.05 inch pad between images and only
- the lower-left axes is labeled.
- """
- grid = AxesGrid(fig, 141, # similar to subplot(141)
- nrows_ncols=(2, 2),
- axes_pad=0.05,
- label_mode="1",
- )
-
- Z, extent = get_demo_image()
- for i in range(4):
- im = grid[i].imshow(Z, extent=extent, interpolation="nearest")
-
- # This only affects axes in first column and second row as share_all =
- # False.
- grid.axes_llc.set_xticks([-2, 0, 2])
- grid.axes_llc.set_yticks([-2, 0, 2])
-
-
- def demo_grid_with_single_cbar(fig):
- """
- A grid of 2x2 images with a single colorbar
- """
- grid = AxesGrid(fig, 142, # similar to subplot(142)
- nrows_ncols=(2, 2),
- axes_pad=0.0,
- share_all=True,
- label_mode="L",
- cbar_location="top",
- cbar_mode="single",
- )
-
- Z, extent = get_demo_image()
- for i in range(4):
- im = grid[i].imshow(Z, extent=extent, interpolation="nearest")
- #plt.colorbar(im, cax = grid.cbar_axes[0])
- grid.cbar_axes[0].colorbar(im)
-
- for cax in grid.cbar_axes:
- cax.toggle_label(False)
-
- # This affects all axes as share_all = True.
- grid.axes_llc.set_xticks([-2, 0, 2])
- grid.axes_llc.set_yticks([-2, 0, 2])
-
-
- def demo_grid_with_each_cbar(fig):
- """
- A grid of 2x2 images. Each image has its own colorbar.
- """
-
- grid = AxesGrid(fig, 143, # similar to subplot(143)
- nrows_ncols=(2, 2),
- axes_pad=0.1,
- label_mode="1",
- share_all=True,
- cbar_location="top",
- cbar_mode="each",
- cbar_size="7%",
- cbar_pad="2%",
- )
- Z, extent = get_demo_image()
- for i in range(4):
- im = grid[i].imshow(Z, extent=extent, interpolation="nearest")
- grid.cbar_axes[i].colorbar(im)
-
- for cax in grid.cbar_axes:
- cax.toggle_label(False)
-
- # This affects all axes because we set share_all = True.
- grid.axes_llc.set_xticks([-2, 0, 2])
- grid.axes_llc.set_yticks([-2, 0, 2])
-
-
- def demo_grid_with_each_cbar_labelled(fig):
- """
- A grid of 2x2 images. Each image has its own colorbar.
- """
-
- grid = AxesGrid(fig, 144, # similar to subplot(144)
- nrows_ncols=(2, 2),
- axes_pad=(0.45, 0.15),
- label_mode="1",
- share_all=True,
- cbar_location="right",
- cbar_mode="each",
- cbar_size="7%",
- cbar_pad="2%",
- )
- Z, extent = get_demo_image()
-
- # Use a different colorbar range every time
- limits = ((0, 1), (-2, 2), (-1.7, 1.4), (-1.5, 1))
- for i in range(4):
- im = grid[i].imshow(Z, extent=extent, interpolation="nearest",
- vmin=limits[i][0], vmax=limits[i][1])
- grid.cbar_axes[i].colorbar(im)
-
- for i, cax in enumerate(grid.cbar_axes):
- cax.set_yticks((limits[i][0], limits[i][1]))
-
- # This affects all axes because we set share_all = True.
- grid.axes_llc.set_xticks([-2, 0, 2])
- grid.axes_llc.set_yticks([-2, 0, 2])
-
-
- if 1:
- F = plt.figure(1, (10.5, 2.5))
-
- F.subplots_adjust(left=0.05, right=0.95)
-
- demo_simple_grid(F)
- demo_grid_with_single_cbar(F)
- demo_grid_with_each_cbar(F)
- demo_grid_with_each_cbar_labelled(F)
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_axes_grid.txt b/_sources/examples/axes_grid/demo_axes_grid.txt
deleted file mode 100644
index 67228f559f9..00000000000
--- a/_sources/examples/axes_grid/demo_axes_grid.txt
+++ /dev/null
@@ -1,147 +0,0 @@
-.. _axes_grid-demo_axes_grid:
-
-axes_grid example code: demo_axes_grid.py
-=========================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/demo_axes_grid.py
-
-::
-
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1 import AxesGrid
-
-
- def get_demo_image():
- import numpy as np
- from matplotlib.cbook import get_sample_data
- f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False)
- z = np.load(f)
- # z is a numpy array of 15x15
- return z, (-3, 4, -4, 3)
-
-
- def demo_simple_grid(fig):
- """
- A grid of 2x2 images with 0.05 inch pad between images and only
- the lower-left axes is labeled.
- """
- grid = AxesGrid(fig, 141, # similar to subplot(141)
- nrows_ncols=(2, 2),
- axes_pad=0.05,
- label_mode="1",
- )
-
- Z, extent = get_demo_image()
- for i in range(4):
- im = grid[i].imshow(Z, extent=extent, interpolation="nearest")
-
- # This only affects axes in first column and second row as share_all =
- # False.
- grid.axes_llc.set_xticks([-2, 0, 2])
- grid.axes_llc.set_yticks([-2, 0, 2])
-
-
- def demo_grid_with_single_cbar(fig):
- """
- A grid of 2x2 images with a single colorbar
- """
- grid = AxesGrid(fig, 142, # similar to subplot(142)
- nrows_ncols=(2, 2),
- axes_pad=0.0,
- share_all=True,
- label_mode="L",
- cbar_location="top",
- cbar_mode="single",
- )
-
- Z, extent = get_demo_image()
- for i in range(4):
- im = grid[i].imshow(Z, extent=extent, interpolation="nearest")
- #plt.colorbar(im, cax = grid.cbar_axes[0])
- grid.cbar_axes[0].colorbar(im)
-
- for cax in grid.cbar_axes:
- cax.toggle_label(False)
-
- # This affects all axes as share_all = True.
- grid.axes_llc.set_xticks([-2, 0, 2])
- grid.axes_llc.set_yticks([-2, 0, 2])
-
-
- def demo_grid_with_each_cbar(fig):
- """
- A grid of 2x2 images. Each image has its own colorbar.
- """
-
- grid = AxesGrid(fig, 143, # similar to subplot(143)
- nrows_ncols=(2, 2),
- axes_pad=0.1,
- label_mode="1",
- share_all=True,
- cbar_location="top",
- cbar_mode="each",
- cbar_size="7%",
- cbar_pad="2%",
- )
- Z, extent = get_demo_image()
- for i in range(4):
- im = grid[i].imshow(Z, extent=extent, interpolation="nearest")
- grid.cbar_axes[i].colorbar(im)
-
- for cax in grid.cbar_axes:
- cax.toggle_label(False)
-
- # This affects all axes because we set share_all = True.
- grid.axes_llc.set_xticks([-2, 0, 2])
- grid.axes_llc.set_yticks([-2, 0, 2])
-
-
- def demo_grid_with_each_cbar_labelled(fig):
- """
- A grid of 2x2 images. Each image has its own colorbar.
- """
-
- grid = AxesGrid(fig, 144, # similar to subplot(144)
- nrows_ncols=(2, 2),
- axes_pad=(0.45, 0.15),
- label_mode="1",
- share_all=True,
- cbar_location="right",
- cbar_mode="each",
- cbar_size="7%",
- cbar_pad="2%",
- )
- Z, extent = get_demo_image()
-
- # Use a different colorbar range every time
- limits = ((0, 1), (-2, 2), (-1.7, 1.4), (-1.5, 1))
- for i in range(4):
- im = grid[i].imshow(Z, extent=extent, interpolation="nearest",
- vmin=limits[i][0], vmax=limits[i][1])
- grid.cbar_axes[i].colorbar(im)
-
- for i, cax in enumerate(grid.cbar_axes):
- cax.set_yticks((limits[i][0], limits[i][1]))
-
- # This affects all axes because we set share_all = True.
- grid.axes_llc.set_xticks([-2, 0, 2])
- grid.axes_llc.set_yticks([-2, 0, 2])
-
-
- if 1:
- F = plt.figure(1, (10.5, 2.5))
-
- F.subplots_adjust(left=0.05, right=0.95)
-
- demo_simple_grid(F)
- demo_grid_with_single_cbar(F)
- demo_grid_with_each_cbar(F)
- demo_grid_with_each_cbar_labelled(F)
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_axes_grid2.rst.txt b/_sources/examples/axes_grid/demo_axes_grid2.rst.txt
deleted file mode 100644
index 73aaf0d8e03..00000000000
--- a/_sources/examples/axes_grid/demo_axes_grid2.rst.txt
+++ /dev/null
@@ -1,127 +0,0 @@
-.. _axes_grid-demo_axes_grid2:
-
-axes_grid example code: demo_axes_grid2.py
-==========================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/demo_axes_grid2.py
-
-::
-
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1 import ImageGrid
- import numpy as np
-
-
- def get_demo_image():
- from matplotlib.cbook import get_sample_data
- f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False)
- z = np.load(f)
- # z is a numpy array of 15x15
- return z, (-3, 4, -4, 3)
-
-
- def add_inner_title(ax, title, loc, size=None, **kwargs):
- from matplotlib.offsetbox import AnchoredText
- from matplotlib.patheffects import withStroke
- if size is None:
- size = dict(size=plt.rcParams['legend.fontsize'])
- at = AnchoredText(title, loc=loc, prop=size,
- pad=0., borderpad=0.5,
- frameon=False, **kwargs)
- ax.add_artist(at)
- at.txt._text.set_path_effects([withStroke(foreground="w", linewidth=3)])
- return at
-
- if 1:
- F = plt.figure(1, (6, 6))
- F.clf()
-
- # prepare images
- Z, extent = get_demo_image()
- ZS = [Z[i::3, :] for i in range(3)]
- extent = extent[0], extent[1]/3., extent[2], extent[3]
-
- # demo 1 : colorbar at each axes
-
- grid = ImageGrid(F, 211, # similar to subplot(111)
- nrows_ncols=(1, 3),
- direction="row",
- axes_pad=0.05,
- add_all=True,
- label_mode="1",
- share_all=True,
- cbar_location="top",
- cbar_mode="each",
- cbar_size="7%",
- cbar_pad="1%",
- )
-
- for ax, z in zip(grid, ZS):
- im = ax.imshow(
- z, origin="lower", extent=extent, interpolation="nearest")
- ax.cax.colorbar(im)
-
- for ax, im_title in zip(grid, ["Image 1", "Image 2", "Image 3"]):
- t = add_inner_title(ax, im_title, loc=3)
- t.patch.set_alpha(0.5)
-
- for ax, z in zip(grid, ZS):
- ax.cax.toggle_label(True)
- #axis = ax.cax.axis[ax.cax.orientation]
- #axis.label.set_text("counts s$^{-1}$")
- #axis.label.set_size(10)
- #axis.major_ticklabels.set_size(6)
-
- # changing the colorbar ticks
- grid[1].cax.set_xticks([-1, 0, 1])
- grid[2].cax.set_xticks([-1, 0, 1])
-
- grid[0].set_xticks([-2, 0])
- grid[0].set_yticks([-2, 0, 2])
-
- # demo 2 : shared colorbar
-
- grid2 = ImageGrid(F, 212,
- nrows_ncols=(1, 3),
- direction="row",
- axes_pad=0.05,
- add_all=True,
- label_mode="1",
- share_all=True,
- cbar_location="right",
- cbar_mode="single",
- cbar_size="10%",
- cbar_pad=0.05,
- )
-
- grid2[0].set_xlabel("X")
- grid2[0].set_ylabel("Y")
-
- vmax, vmin = np.max(ZS), np.min(ZS)
- import matplotlib.colors
- norm = matplotlib.colors.Normalize(vmax=vmax, vmin=vmin)
-
- for ax, z in zip(grid2, ZS):
- im = ax.imshow(z, norm=norm,
- origin="lower", extent=extent,
- interpolation="nearest")
-
- # With cbar_mode="single", cax attribute of all axes are identical.
- ax.cax.colorbar(im)
- ax.cax.toggle_label(True)
-
- for ax, im_title in zip(grid2, ["(a)", "(b)", "(c)"]):
- t = add_inner_title(ax, im_title, loc=2)
- t.patch.set_ec("none")
- t.patch.set_alpha(0.5)
-
- grid2[0].set_xticks([-2, 0])
- grid2[0].set_yticks([-2, 0, 2])
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_axes_grid2.txt b/_sources/examples/axes_grid/demo_axes_grid2.txt
deleted file mode 100644
index 27ed4e50328..00000000000
--- a/_sources/examples/axes_grid/demo_axes_grid2.txt
+++ /dev/null
@@ -1,127 +0,0 @@
-.. _axes_grid-demo_axes_grid2:
-
-axes_grid example code: demo_axes_grid2.py
-==========================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/demo_axes_grid2.py
-
-::
-
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1 import ImageGrid
- import numpy as np
-
-
- def get_demo_image():
- from matplotlib.cbook import get_sample_data
- f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False)
- z = np.load(f)
- # z is a numpy array of 15x15
- return z, (-3, 4, -4, 3)
-
-
- def add_inner_title(ax, title, loc, size=None, **kwargs):
- from matplotlib.offsetbox import AnchoredText
- from matplotlib.patheffects import withStroke
- if size is None:
- size = dict(size=plt.rcParams['legend.fontsize'])
- at = AnchoredText(title, loc=loc, prop=size,
- pad=0., borderpad=0.5,
- frameon=False, **kwargs)
- ax.add_artist(at)
- at.txt._text.set_path_effects([withStroke(foreground="w", linewidth=3)])
- return at
-
- if 1:
- F = plt.figure(1, (6, 6))
- F.clf()
-
- # prepare images
- Z, extent = get_demo_image()
- ZS = [Z[i::3, :] for i in range(3)]
- extent = extent[0], extent[1]/3., extent[2], extent[3]
-
- # demo 1 : colorbar at each axes
-
- grid = ImageGrid(F, 211, # similar to subplot(111)
- nrows_ncols=(1, 3),
- direction="row",
- axes_pad=0.05,
- add_all=True,
- label_mode="1",
- share_all=True,
- cbar_location="top",
- cbar_mode="each",
- cbar_size="7%",
- cbar_pad="1%",
- )
-
- for ax, z in zip(grid, ZS):
- im = ax.imshow(
- z, origin="lower", extent=extent, interpolation="nearest")
- ax.cax.colorbar(im)
-
- for ax, im_title in zip(grid, ["Image 1", "Image 2", "Image 3"]):
- t = add_inner_title(ax, im_title, loc=3)
- t.patch.set_alpha(0.5)
-
- for ax, z in zip(grid, ZS):
- ax.cax.toggle_label(True)
- #axis = ax.cax.axis[ax.cax.orientation]
- #axis.label.set_text("counts s$^{-1}$")
- #axis.label.set_size(10)
- #axis.major_ticklabels.set_size(6)
-
- # changing the colorbar ticks
- grid[1].cax.set_xticks([-1, 0, 1])
- grid[2].cax.set_xticks([-1, 0, 1])
-
- grid[0].set_xticks([-2, 0])
- grid[0].set_yticks([-2, 0, 2])
-
- # demo 2 : shared colorbar
-
- grid2 = ImageGrid(F, 212,
- nrows_ncols=(1, 3),
- direction="row",
- axes_pad=0.05,
- add_all=True,
- label_mode="1",
- share_all=True,
- cbar_location="right",
- cbar_mode="single",
- cbar_size="10%",
- cbar_pad=0.05,
- )
-
- grid2[0].set_xlabel("X")
- grid2[0].set_ylabel("Y")
-
- vmax, vmin = np.max(ZS), np.min(ZS)
- import matplotlib.colors
- norm = matplotlib.colors.Normalize(vmax=vmax, vmin=vmin)
-
- for ax, z in zip(grid2, ZS):
- im = ax.imshow(z, norm=norm,
- origin="lower", extent=extent,
- interpolation="nearest")
-
- # With cbar_mode="single", cax attribute of all axes are identical.
- ax.cax.colorbar(im)
- ax.cax.toggle_label(True)
-
- for ax, im_title in zip(grid2, ["(a)", "(b)", "(c)"]):
- t = add_inner_title(ax, im_title, loc=2)
- t.patch.set_ec("none")
- t.patch.set_alpha(0.5)
-
- grid2[0].set_xticks([-2, 0])
- grid2[0].set_yticks([-2, 0, 2])
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_axes_hbox_divider.rst.txt b/_sources/examples/axes_grid/demo_axes_hbox_divider.rst.txt
deleted file mode 100644
index dab895cd08d..00000000000
--- a/_sources/examples/axes_grid/demo_axes_hbox_divider.rst.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-.. _axes_grid-demo_axes_hbox_divider:
-
-axes_grid example code: demo_axes_hbox_divider.py
-=================================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/demo_axes_hbox_divider.py
-
-::
-
- import numpy as np
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1.axes_divider import HBoxDivider
- import mpl_toolkits.axes_grid1.axes_size as Size
-
-
- def make_heights_equal(fig, rect, ax1, ax2, pad):
- # pad in inches
-
- h1, v1 = Size.AxesX(ax1), Size.AxesY(ax1)
- h2, v2 = Size.AxesX(ax2), Size.AxesY(ax2)
-
- pad_v = Size.Scaled(1)
- pad_h = Size.Fixed(pad)
-
- my_divider = HBoxDivider(fig, rect,
- horizontal=[h1, pad_h, h2],
- vertical=[v1, pad_v, v2])
-
- ax1.set_axes_locator(my_divider.new_locator(0))
- ax2.set_axes_locator(my_divider.new_locator(2))
-
-
- if __name__ == "__main__":
-
- arr1 = np.arange(20).reshape((4, 5))
- arr2 = np.arange(20).reshape((5, 4))
-
- fig, (ax1, ax2) = plt.subplots(1, 2)
- ax1.imshow(arr1, interpolation="nearest")
- ax2.imshow(arr2, interpolation="nearest")
-
- rect = 111 # subplot param for combined axes
- make_heights_equal(fig, rect, ax1, ax2, pad=0.5) # pad in inches
-
- for ax in [ax1, ax2]:
- ax.locator_params(nbins=4)
-
- # annotate
- ax3 = plt.axes([0.5, 0.5, 0.001, 0.001], frameon=False)
- ax3.xaxis.set_visible(False)
- ax3.yaxis.set_visible(False)
- ax3.annotate("Location of two axes are adjusted\n"
- "so that they have equal heights\n"
- "while maintaining their aspect ratios", (0.5, 0.5),
- xycoords="axes fraction", va="center", ha="center",
- bbox=dict(boxstyle="round, pad=1", fc="w"))
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_axes_hbox_divider.txt b/_sources/examples/axes_grid/demo_axes_hbox_divider.txt
deleted file mode 100644
index d9b73ebb0ae..00000000000
--- a/_sources/examples/axes_grid/demo_axes_hbox_divider.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-.. _axes_grid-demo_axes_hbox_divider:
-
-axes_grid example code: demo_axes_hbox_divider.py
-=================================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/demo_axes_hbox_divider.py
-
-::
-
- import numpy as np
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1.axes_divider import HBoxDivider
- import mpl_toolkits.axes_grid1.axes_size as Size
-
-
- def make_heights_equal(fig, rect, ax1, ax2, pad):
- # pad in inches
-
- h1, v1 = Size.AxesX(ax1), Size.AxesY(ax1)
- h2, v2 = Size.AxesX(ax2), Size.AxesY(ax2)
-
- pad_v = Size.Scaled(1)
- pad_h = Size.Fixed(pad)
-
- my_divider = HBoxDivider(fig, rect,
- horizontal=[h1, pad_h, h2],
- vertical=[v1, pad_v, v2])
-
- ax1.set_axes_locator(my_divider.new_locator(0))
- ax2.set_axes_locator(my_divider.new_locator(2))
-
-
- if __name__ == "__main__":
-
- arr1 = np.arange(20).reshape((4, 5))
- arr2 = np.arange(20).reshape((5, 4))
-
- fig, (ax1, ax2) = plt.subplots(1, 2)
- ax1.imshow(arr1, interpolation="nearest")
- ax2.imshow(arr2, interpolation="nearest")
-
- rect = 111 # subplot param for combined axes
- make_heights_equal(fig, rect, ax1, ax2, pad=0.5) # pad in inches
-
- for ax in [ax1, ax2]:
- ax.locator_params(nbins=4)
-
- # annotate
- ax3 = plt.axes([0.5, 0.5, 0.001, 0.001], frameon=False)
- ax3.xaxis.set_visible(False)
- ax3.yaxis.set_visible(False)
- ax3.annotate("Location of two axes are adjusted\n"
- "so that they have equal heights\n"
- "while maintaining their aspect ratios", (0.5, 0.5),
- xycoords="axes fraction", va="center", ha="center",
- bbox=dict(boxstyle="round, pad=1", fc="w"))
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_axes_rgb.rst.txt b/_sources/examples/axes_grid/demo_axes_rgb.rst.txt
deleted file mode 100644
index f0b21418068..00000000000
--- a/_sources/examples/axes_grid/demo_axes_rgb.rst.txt
+++ /dev/null
@@ -1,98 +0,0 @@
-.. _axes_grid-demo_axes_rgb:
-
-axes_grid example code: demo_axes_rgb.py
-========================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/demo_axes_rgb.py
-
-::
-
- import numpy as np
- import matplotlib.pyplot as plt
-
- from mpl_toolkits.axes_grid1.axes_rgb import make_rgb_axes, RGBAxes
-
-
- def get_demo_image():
- from matplotlib.cbook import get_sample_data
- f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False)
- z = np.load(f)
- # z is a numpy array of 15x15
- return z, (-3, 4, -4, 3)
-
-
- def get_rgb():
- Z, extent = get_demo_image()
-
- Z[Z < 0] = 0.
- Z = Z/Z.max()
-
- R = Z[:13, :13]
- G = Z[2:, 2:]
- B = Z[:13, 2:]
-
- return R, G, B
-
-
- def make_cube(r, g, b):
- ny, nx = r.shape
- R = np.zeros([ny, nx, 3], dtype="d")
- R[:, :, 0] = r
- G = np.zeros_like(R)
- G[:, :, 1] = g
- B = np.zeros_like(R)
- B[:, :, 2] = b
-
- RGB = R + G + B
-
- return R, G, B, RGB
-
-
- def demo_rgb():
- fig, ax = plt.subplots()
- ax_r, ax_g, ax_b = make_rgb_axes(ax, pad=0.02)
- #fig.add_axes(ax_r)
- #fig.add_axes(ax_g)
- #fig.add_axes(ax_b)
-
- r, g, b = get_rgb()
- im_r, im_g, im_b, im_rgb = make_cube(r, g, b)
- kwargs = dict(origin="lower", interpolation="nearest")
- ax.imshow(im_rgb, **kwargs)
- ax_r.imshow(im_r, **kwargs)
- ax_g.imshow(im_g, **kwargs)
- ax_b.imshow(im_b, **kwargs)
-
-
- def demo_rgb2():
- fig = plt.figure(2)
- ax = RGBAxes(fig, [0.1, 0.1, 0.8, 0.8], pad=0.0)
- #fig.add_axes(ax)
- #ax.add_RGB_to_figure()
-
- r, g, b = get_rgb()
- kwargs = dict(origin="lower", interpolation="nearest")
- ax.imshow_rgb(r, g, b, **kwargs)
-
- ax.RGB.set_xlim(0., 9.5)
- ax.RGB.set_ylim(0.9, 10.6)
-
- for ax1 in [ax.RGB, ax.R, ax.G, ax.B]:
- for sp1 in ax1.spines.values():
- sp1.set_color("w")
- for tick in ax1.xaxis.get_major_ticks() + ax1.yaxis.get_major_ticks():
- tick.tick1line.set_mec("w")
- tick.tick2line.set_mec("w")
-
- return ax
-
-
- demo_rgb()
- ax = demo_rgb2()
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_axes_rgb.txt b/_sources/examples/axes_grid/demo_axes_rgb.txt
deleted file mode 100644
index 43494c19b49..00000000000
--- a/_sources/examples/axes_grid/demo_axes_rgb.txt
+++ /dev/null
@@ -1,98 +0,0 @@
-.. _axes_grid-demo_axes_rgb:
-
-axes_grid example code: demo_axes_rgb.py
-========================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/demo_axes_rgb.py
-
-::
-
- import numpy as np
- import matplotlib.pyplot as plt
-
- from mpl_toolkits.axes_grid1.axes_rgb import make_rgb_axes, RGBAxes
-
-
- def get_demo_image():
- from matplotlib.cbook import get_sample_data
- f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False)
- z = np.load(f)
- # z is a numpy array of 15x15
- return z, (-3, 4, -4, 3)
-
-
- def get_rgb():
- Z, extent = get_demo_image()
-
- Z[Z < 0] = 0.
- Z = Z/Z.max()
-
- R = Z[:13, :13]
- G = Z[2:, 2:]
- B = Z[:13, 2:]
-
- return R, G, B
-
-
- def make_cube(r, g, b):
- ny, nx = r.shape
- R = np.zeros([ny, nx, 3], dtype="d")
- R[:, :, 0] = r
- G = np.zeros_like(R)
- G[:, :, 1] = g
- B = np.zeros_like(R)
- B[:, :, 2] = b
-
- RGB = R + G + B
-
- return R, G, B, RGB
-
-
- def demo_rgb():
- fig, ax = plt.subplots()
- ax_r, ax_g, ax_b = make_rgb_axes(ax, pad=0.02)
- #fig.add_axes(ax_r)
- #fig.add_axes(ax_g)
- #fig.add_axes(ax_b)
-
- r, g, b = get_rgb()
- im_r, im_g, im_b, im_rgb = make_cube(r, g, b)
- kwargs = dict(origin="lower", interpolation="nearest")
- ax.imshow(im_rgb, **kwargs)
- ax_r.imshow(im_r, **kwargs)
- ax_g.imshow(im_g, **kwargs)
- ax_b.imshow(im_b, **kwargs)
-
-
- def demo_rgb2():
- fig = plt.figure(2)
- ax = RGBAxes(fig, [0.1, 0.1, 0.8, 0.8], pad=0.0)
- #fig.add_axes(ax)
- #ax.add_RGB_to_figure()
-
- r, g, b = get_rgb()
- kwargs = dict(origin="lower", interpolation="nearest")
- ax.imshow_rgb(r, g, b, **kwargs)
-
- ax.RGB.set_xlim(0., 9.5)
- ax.RGB.set_ylim(0.9, 10.6)
-
- for ax1 in [ax.RGB, ax.R, ax.G, ax.B]:
- for sp1 in ax1.spines.values():
- sp1.set_color("w")
- for tick in ax1.xaxis.get_major_ticks() + ax1.yaxis.get_major_ticks():
- tick.tick1line.set_mec("w")
- tick.tick2line.set_mec("w")
-
- return ax
-
-
- demo_rgb()
- ax = demo_rgb2()
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_axisline_style.rst.txt b/_sources/examples/axes_grid/demo_axisline_style.rst.txt
deleted file mode 100644
index f8a28cb9bf2..00000000000
--- a/_sources/examples/axes_grid/demo_axisline_style.rst.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-.. _axes_grid-demo_axisline_style:
-
-axes_grid example code: demo_axisline_style.py
-==============================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/demo_axisline_style.py
-
-::
-
-
- from mpl_toolkits.axes_grid.axislines import SubplotZero
- import matplotlib.pyplot as plt
- import numpy as np
-
- if 1:
- fig = plt.figure(1)
- ax = SubplotZero(fig, 111)
- fig.add_subplot(ax)
-
- for direction in ["xzero", "yzero"]:
- ax.axis[direction].set_axisline_style("-|>")
- ax.axis[direction].set_visible(True)
-
- for direction in ["left", "right", "bottom", "top"]:
- ax.axis[direction].set_visible(False)
-
- x = np.linspace(-0.5, 1., 100)
- ax.plot(x, np.sin(x*np.pi))
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_axisline_style.txt b/_sources/examples/axes_grid/demo_axisline_style.txt
deleted file mode 100644
index 261996ca22e..00000000000
--- a/_sources/examples/axes_grid/demo_axisline_style.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-.. _axes_grid-demo_axisline_style:
-
-axes_grid example code: demo_axisline_style.py
-==============================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/demo_axisline_style.py
-
-::
-
-
- from mpl_toolkits.axes_grid.axislines import SubplotZero
- import matplotlib.pyplot as plt
- import numpy as np
-
- if 1:
- fig = plt.figure(1)
- ax = SubplotZero(fig, 111)
- fig.add_subplot(ax)
-
- for direction in ["xzero", "yzero"]:
- ax.axis[direction].set_axisline_style("-|>")
- ax.axis[direction].set_visible(True)
-
- for direction in ["left", "right", "bottom", "top"]:
- ax.axis[direction].set_visible(False)
-
- x = np.linspace(-0.5, 1., 100)
- ax.plot(x, np.sin(x*np.pi))
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_colorbar_with_inset_locator.rst.txt b/_sources/examples/axes_grid/demo_colorbar_with_inset_locator.rst.txt
deleted file mode 100644
index 33151aab52a..00000000000
--- a/_sources/examples/axes_grid/demo_colorbar_with_inset_locator.rst.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-.. _axes_grid-demo_colorbar_with_inset_locator:
-
-axes_grid example code: demo_colorbar_with_inset_locator.py
-===========================================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.py
-
-::
-
- import matplotlib.pyplot as plt
-
- from mpl_toolkits.axes_grid1.inset_locator import inset_axes
-
- fig, (ax1, ax2) = plt.subplots(1, 2, figsize=[6, 3])
-
- axins1 = inset_axes(ax1,
- width="50%", # width = 10% of parent_bbox width
- height="5%", # height : 50%
- loc=1)
-
- im1 = ax1.imshow([[1, 2], [2, 3]])
- plt.colorbar(im1, cax=axins1, orientation="horizontal", ticks=[1, 2, 3])
- axins1.xaxis.set_ticks_position("bottom")
-
- axins = inset_axes(ax2,
- width="5%", # width = 10% of parent_bbox width
- height="50%", # height : 50%
- loc=3,
- bbox_to_anchor=(1.05, 0., 1, 1),
- bbox_transform=ax2.transAxes,
- borderpad=0,
- )
-
- # Controlling the placement of the inset axes is basically same as that
- # of the legend. you may want to play with the borderpad value and
- # the bbox_to_anchor coordinate.
-
- im = ax2.imshow([[1, 2], [2, 3]])
- plt.colorbar(im, cax=axins, ticks=[1, 2, 3])
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_colorbar_with_inset_locator.txt b/_sources/examples/axes_grid/demo_colorbar_with_inset_locator.txt
deleted file mode 100644
index 16183db36b9..00000000000
--- a/_sources/examples/axes_grid/demo_colorbar_with_inset_locator.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-.. _axes_grid-demo_colorbar_with_inset_locator:
-
-axes_grid example code: demo_colorbar_with_inset_locator.py
-===========================================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.py
-
-::
-
- import matplotlib.pyplot as plt
-
- from mpl_toolkits.axes_grid1.inset_locator import inset_axes
-
- fig, (ax1, ax2) = plt.subplots(1, 2, figsize=[6, 3])
-
- axins1 = inset_axes(ax1,
- width="50%", # width = 10% of parent_bbox width
- height="5%", # height : 50%
- loc=1)
-
- im1 = ax1.imshow([[1, 2], [2, 3]])
- plt.colorbar(im1, cax=axins1, orientation="horizontal", ticks=[1, 2, 3])
- axins1.xaxis.set_ticks_position("bottom")
-
- axins = inset_axes(ax2,
- width="5%", # width = 10% of parent_bbox width
- height="50%", # height : 50%
- loc=3,
- bbox_to_anchor=(1.05, 0., 1, 1),
- bbox_transform=ax2.transAxes,
- borderpad=0,
- )
-
- # Controlling the placement of the inset axes is basically same as that
- # of the legend. you may want to play with the borderpad value and
- # the bbox_to_anchor coordinate.
-
- im = ax2.imshow([[1, 2], [2, 3]])
- plt.colorbar(im, cax=axins, ticks=[1, 2, 3])
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_curvelinear_grid.rst.txt b/_sources/examples/axes_grid/demo_curvelinear_grid.rst.txt
deleted file mode 100644
index b96170719a4..00000000000
--- a/_sources/examples/axes_grid/demo_curvelinear_grid.rst.txt
+++ /dev/null
@@ -1,151 +0,0 @@
-.. _axes_grid-demo_curvelinear_grid:
-
-axes_grid example code: demo_curvelinear_grid.py
-================================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/demo_curvelinear_grid.py
-
-::
-
- """
- Custom grid and ticklines.
-
- This example demonstrates how to use GridHelperCurveLinear to define
- custom grids and ticklines by applying a transformation on the grid.
- This can be used, as showcase on the second plot, to create polar
- projections in a rectangular box.
- """
-
- import numpy as np
-
- import matplotlib.pyplot as plt
- import matplotlib.cbook as cbook
-
- from mpl_toolkits.axisartist import Subplot
- from mpl_toolkits.axisartist import SubplotHost, \
- ParasiteAxesAuxTrans
- from mpl_toolkits.axisartist.grid_helper_curvelinear import \
- GridHelperCurveLinear
-
-
- def curvelinear_test1(fig):
- """
- grid for custom transform.
- """
-
- def tr(x, y):
- x, y = np.asarray(x), np.asarray(y)
- return x, y - x
-
- def inv_tr(x, y):
- x, y = np.asarray(x), np.asarray(y)
- return x, y + x
-
- grid_helper = GridHelperCurveLinear((tr, inv_tr))
-
- ax1 = Subplot(fig, 1, 2, 1, grid_helper=grid_helper)
- # ax1 will have a ticks and gridlines defined by the given
- # transform (+ transData of the Axes). Note that the transform of
- # the Axes itself (i.e., transData) is not affected by the given
- # transform.
-
- fig.add_subplot(ax1)
-
- xx, yy = tr([3, 6], [5.0, 10.])
- ax1.plot(xx, yy, linewidth=2.0)
-
- ax1.set_aspect(1.)
- ax1.set_xlim(0, 10.)
- ax1.set_ylim(0, 10.)
-
- ax1.axis["t"] = ax1.new_floating_axis(0, 3.)
- ax1.axis["t2"] = ax1.new_floating_axis(1, 7.)
- ax1.grid(True, zorder=0)
-
-
- import mpl_toolkits.axisartist.angle_helper as angle_helper
-
- from matplotlib.projections import PolarAxes
- from matplotlib.transforms import Affine2D
-
-
- def curvelinear_test2(fig):
- """
- polar projection, but in a rectangular box.
- """
-
- # PolarAxes.PolarTransform takes radian. However, we want our coordinate
- # system in degree
- tr = Affine2D().scale(np.pi/180., 1.) + PolarAxes.PolarTransform()
-
- # polar projection, which involves cycle, and also has limits in
- # its coordinates, needs a special method to find the extremes
- # (min, max of the coordinate within the view).
-
- # 20, 20 : number of sampling points along x, y direction
- extreme_finder = angle_helper.ExtremeFinderCycle(20, 20,
- lon_cycle=360,
- lat_cycle=None,
- lon_minmax=None,
- lat_minmax=(0, np.inf),
- )
-
- grid_locator1 = angle_helper.LocatorDMS(12)
- # Find a grid values appropriate for the coordinate (degree,
- # minute, second).
-
- tick_formatter1 = angle_helper.FormatterDMS()
- # And also uses an appropriate formatter. Note that,the
- # acceptable Locator and Formatter class is a bit different than
- # that of mpl's, and you cannot directly use mpl's Locator and
- # Formatter here (but may be possible in the future).
-
- grid_helper = GridHelperCurveLinear(tr,
- extreme_finder=extreme_finder,
- grid_locator1=grid_locator1,
- tick_formatter1=tick_formatter1
- )
-
- ax1 = SubplotHost(fig, 1, 2, 2, grid_helper=grid_helper)
-
- # make ticklabels of right and top axis visible.
- ax1.axis["right"].major_ticklabels.set_visible(True)
- ax1.axis["top"].major_ticklabels.set_visible(True)
-
- # let right axis shows ticklabels for 1st coordinate (angle)
- ax1.axis["right"].get_helper().nth_coord_ticks = 0
- # let bottom axis shows ticklabels for 2nd coordinate (radius)
- ax1.axis["bottom"].get_helper().nth_coord_ticks = 1
-
- fig.add_subplot(ax1)
-
- # A parasite axes with given transform
- ax2 = ParasiteAxesAuxTrans(ax1, tr, "equal")
- # note that ax2.transData == tr + ax1.transData
- # Anything you draw in ax2 will match the ticks and grids of ax1.
- ax1.parasites.append(ax2)
- intp = cbook.simple_linear_interpolation
- ax2.plot(intp(np.array([0, 30]), 50),
- intp(np.array([10., 10.]), 50),
- linewidth=2.0)
-
- ax1.set_aspect(1.)
- ax1.set_xlim(-5, 12)
- ax1.set_ylim(-5, 10)
-
- ax1.grid(True, zorder=0)
-
- if 1:
- fig = plt.figure(1, figsize=(7, 4))
- fig.clf()
-
- curvelinear_test1(fig)
- curvelinear_test2(fig)
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_curvelinear_grid.txt b/_sources/examples/axes_grid/demo_curvelinear_grid.txt
deleted file mode 100644
index dae029323c3..00000000000
--- a/_sources/examples/axes_grid/demo_curvelinear_grid.txt
+++ /dev/null
@@ -1,140 +0,0 @@
-.. _axes_grid-demo_curvelinear_grid:
-
-axes_grid example code: demo_curvelinear_grid.py
-================================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/demo_curvelinear_grid.py
-
-::
-
- import numpy as np
-
- import matplotlib.pyplot as plt
- import matplotlib.cbook as cbook
-
- from mpl_toolkits.axisartist import Subplot
- from mpl_toolkits.axisartist import SubplotHost, \
- ParasiteAxesAuxTrans
- from mpl_toolkits.axisartist.grid_helper_curvelinear import \
- GridHelperCurveLinear
-
-
- def curvelinear_test1(fig):
- """
- grid for custom transform.
- """
-
- def tr(x, y):
- x, y = np.asarray(x), np.asarray(y)
- return x, y - x
-
- def inv_tr(x, y):
- x, y = np.asarray(x), np.asarray(y)
- return x, y + x
-
- grid_helper = GridHelperCurveLinear((tr, inv_tr))
-
- ax1 = Subplot(fig, 1, 2, 1, grid_helper=grid_helper)
- # ax1 will have a ticks and gridlines defined by the given
- # transform (+ transData of the Axes). Note that the transform of
- # the Axes itself (i.e., transData) is not affected by the given
- # transform.
-
- fig.add_subplot(ax1)
-
- xx, yy = tr([3, 6], [5.0, 10.])
- ax1.plot(xx, yy)
-
- ax1.set_aspect(1.)
- ax1.set_xlim(0, 10.)
- ax1.set_ylim(0, 10.)
-
- ax1.axis["t"] = ax1.new_floating_axis(0, 3.)
- ax1.axis["t2"] = ax1.new_floating_axis(1, 7.)
- ax1.grid(True)
-
-
- import mpl_toolkits.axisartist.angle_helper as angle_helper
- from matplotlib.projections import PolarAxes
- from matplotlib.transforms import Affine2D
-
-
- def curvelinear_test2(fig):
- """
- polar projection, but in a rectangular box.
- """
-
- # PolarAxes.PolarTransform takes radian. However, we want our coordinate
- # system in degree
- tr = Affine2D().scale(np.pi/180., 1.) + PolarAxes.PolarTransform()
-
- # polar projection, which involves cycle, and also has limits in
- # its coordinates, needs a special method to find the extremes
- # (min, max of the coordinate within the view).
-
- # 20, 20 : number of sampling points along x, y direction
- extreme_finder = angle_helper.ExtremeFinderCycle(20, 20,
- lon_cycle=360,
- lat_cycle=None,
- lon_minmax=None,
- lat_minmax=(0, np.inf),
- )
-
- grid_locator1 = angle_helper.LocatorDMS(12)
- # Find a grid values appropriate for the coordinate (degree,
- # minute, second).
-
- tick_formatter1 = angle_helper.FormatterDMS()
- # And also uses an appropriate formatter. Note that,the
- # acceptable Locator and Formatter class is a bit different than
- # that of mpl's, and you cannot directly use mpl's Locator and
- # Formatter here (but may be possible in the future).
-
- grid_helper = GridHelperCurveLinear(tr,
- extreme_finder=extreme_finder,
- grid_locator1=grid_locator1,
- tick_formatter1=tick_formatter1
- )
-
- ax1 = SubplotHost(fig, 1, 2, 2, grid_helper=grid_helper)
-
- # make ticklabels of right and top axis visible.
- ax1.axis["right"].major_ticklabels.set_visible(True)
- ax1.axis["top"].major_ticklabels.set_visible(True)
-
- # let right axis shows ticklabels for 1st coordinate (angle)
- ax1.axis["right"].get_helper().nth_coord_ticks = 0
- # let bottom axis shows ticklabels for 2nd coordinate (radius)
- ax1.axis["bottom"].get_helper().nth_coord_ticks = 1
-
- fig.add_subplot(ax1)
-
- # A parasite axes with given transform
- ax2 = ParasiteAxesAuxTrans(ax1, tr, "equal")
- # note that ax2.transData == tr + ax1.transData
- # Anthing you draw in ax2 will match the ticks and grids of ax1.
- ax1.parasites.append(ax2)
- intp = cbook.simple_linear_interpolation
- ax2.plot(intp(np.array([0, 30]), 50),
- intp(np.array([10., 10.]), 50))
-
- ax1.set_aspect(1.)
- ax1.set_xlim(-5, 12)
- ax1.set_ylim(-5, 10)
-
- ax1.grid(True)
-
- if 1:
- fig = plt.figure(1, figsize=(7, 4))
- fig.clf()
-
- curvelinear_test1(fig)
- curvelinear_test2(fig)
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_curvelinear_grid2.rst.txt b/_sources/examples/axes_grid/demo_curvelinear_grid2.rst.txt
deleted file mode 100644
index 482b0b721db..00000000000
--- a/_sources/examples/axes_grid/demo_curvelinear_grid2.rst.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-.. _axes_grid-demo_curvelinear_grid2:
-
-axes_grid example code: demo_curvelinear_grid2.py
-=================================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/demo_curvelinear_grid2.py
-
-::
-
- """
- Custom grid and ticklines.
-
- This example demonstrates how to use GridHelperCurveLinear to define
- custom grids and ticklines by applying a transformation on the grid.
- As showcase on the plot, a 5x5 matrix is displayed on the axes.
- """
-
- import numpy as np
- import matplotlib.pyplot as plt
-
- from mpl_toolkits.axes_grid.grid_helper_curvelinear import \
- GridHelperCurveLinear
- from mpl_toolkits.axes_grid.axislines import Subplot
-
- import mpl_toolkits.axes_grid.angle_helper as angle_helper
-
-
- def curvelinear_test1(fig):
- """
- grid for custom transform.
- """
-
- def tr(x, y):
- sgn = np.sign(x)
- x, y = np.abs(np.asarray(x)), np.asarray(y)
- return sgn*x**.5, y
-
- def inv_tr(x, y):
- sgn = np.sign(x)
- x, y = np.asarray(x), np.asarray(y)
- return sgn*x**2, y
-
- extreme_finder = angle_helper.ExtremeFinderCycle(20, 20,
- lon_cycle=None,
- lat_cycle=None,
- # (0, np.inf),
- lon_minmax=None,
- lat_minmax=None,
- )
-
- grid_helper = GridHelperCurveLinear((tr, inv_tr),
- extreme_finder=extreme_finder)
-
- ax1 = Subplot(fig, 111, grid_helper=grid_helper)
- # ax1 will have a ticks and gridlines defined by the given
- # transform (+ transData of the Axes). Note that the transform of
- # the Axes itself (i.e., transData) is not affected by the given
- # transform.
-
- fig.add_subplot(ax1)
-
- ax1.imshow(np.arange(25).reshape(5, 5),
- vmax=50, cmap=plt.cm.gray_r,
- interpolation="nearest",
- origin="lower")
-
- # tick density
- grid_helper.grid_finder.grid_locator1._nbins = 6
- grid_helper.grid_finder.grid_locator2._nbins = 6
-
-
- if 1:
- fig = plt.figure(1, figsize=(7, 4))
- fig.clf()
-
- curvelinear_test1(fig)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_curvelinear_grid2.txt b/_sources/examples/axes_grid/demo_curvelinear_grid2.txt
deleted file mode 100644
index e1c5efb5621..00000000000
--- a/_sources/examples/axes_grid/demo_curvelinear_grid2.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-.. _axes_grid-demo_curvelinear_grid2:
-
-axes_grid example code: demo_curvelinear_grid2.py
-=================================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/demo_curvelinear_grid2.py
-
-::
-
- import numpy as np
- import matplotlib.pyplot as plt
-
- from mpl_toolkits.axes_grid.grid_helper_curvelinear import \
- GridHelperCurveLinear
- from mpl_toolkits.axes_grid.axislines import Subplot
-
- import mpl_toolkits.axes_grid.angle_helper as angle_helper
-
-
- def curvelinear_test1(fig):
- """
- grid for custom transform.
- """
-
- def tr(x, y):
- sgn = np.sign(x)
- x, y = np.abs(np.asarray(x)), np.asarray(y)
- return sgn*x**.5, y
-
- def inv_tr(x, y):
- sgn = np.sign(x)
- x, y = np.asarray(x), np.asarray(y)
- return sgn*x**2, y
-
- extreme_finder = angle_helper.ExtremeFinderCycle(20, 20,
- lon_cycle=None,
- lat_cycle=None,
- # (0, np.inf),
- lon_minmax=None,
- lat_minmax=None,
- )
-
- grid_helper = GridHelperCurveLinear((tr, inv_tr),
- extreme_finder=extreme_finder)
-
- ax1 = Subplot(fig, 111, grid_helper=grid_helper)
- # ax1 will have a ticks and gridlines defined by the given
- # transform (+ transData of the Axes). Note that the transform of
- # the Axes itself (i.e., transData) is not affected by the given
- # transform.
-
- fig.add_subplot(ax1)
-
- ax1.imshow(np.arange(25).reshape(5, 5),
- vmax=50, cmap=plt.cm.gray_r,
- interpolation="nearest",
- origin="lower")
-
- # tick density
- grid_helper.grid_finder.grid_locator1._nbins = 6
- grid_helper.grid_finder.grid_locator2._nbins = 6
-
-
- if 1:
- fig = plt.figure(1, figsize=(7, 4))
- fig.clf()
-
- curvelinear_test1(fig)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_edge_colorbar.rst.txt b/_sources/examples/axes_grid/demo_edge_colorbar.rst.txt
deleted file mode 100644
index ba8410b31bd..00000000000
--- a/_sources/examples/axes_grid/demo_edge_colorbar.rst.txt
+++ /dev/null
@@ -1,102 +0,0 @@
-.. _axes_grid-demo_edge_colorbar:
-
-axes_grid example code: demo_edge_colorbar.py
-=============================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/demo_edge_colorbar.py
-
-::
-
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1 import AxesGrid
-
-
- def get_demo_image():
- import numpy as np
- from matplotlib.cbook import get_sample_data
- f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False)
- z = np.load(f)
- # z is a numpy array of 15x15
- return z, (-3, 4, -4, 3)
-
-
- def demo_bottom_cbar(fig):
- """
- A grid of 2x2 images with a colorbar for each column.
- """
- grid = AxesGrid(fig, 121, # similar to subplot(132)
- nrows_ncols=(2, 2),
- axes_pad=0.10,
- share_all=True,
- label_mode="1",
- cbar_location="bottom",
- cbar_mode="edge",
- cbar_pad=0.25,
- cbar_size="15%",
- direction="column"
- )
-
- Z, extent = get_demo_image()
- cmaps = [plt.get_cmap("autumn"), plt.get_cmap("summer")]
- for i in range(4):
- im = grid[i].imshow(Z, extent=extent, interpolation="nearest",
- cmap=cmaps[i//2])
- if i % 2:
- cbar = grid.cbar_axes[i//2].colorbar(im)
-
- for cax in grid.cbar_axes:
- cax.toggle_label(True)
- cax.axis[cax.orientation].set_label("Bar")
-
- # This affects all axes as share_all = True.
- grid.axes_llc.set_xticks([-2, 0, 2])
- grid.axes_llc.set_yticks([-2, 0, 2])
-
-
- def demo_right_cbar(fig):
- """
- A grid of 2x2 images. Each row has its own colorbar.
- """
-
- grid = AxesGrid(F, 122, # similar to subplot(122)
- nrows_ncols=(2, 2),
- axes_pad=0.10,
- label_mode="1",
- share_all=True,
- cbar_location="right",
- cbar_mode="edge",
- cbar_size="7%",
- cbar_pad="2%",
- )
- Z, extent = get_demo_image()
- cmaps = [plt.get_cmap("spring"), plt.get_cmap("winter")]
- for i in range(4):
- im = grid[i].imshow(Z, extent=extent, interpolation="nearest",
- cmap=cmaps[i//2])
- if i % 2:
- grid.cbar_axes[i//2].colorbar(im)
-
- for cax in grid.cbar_axes:
- cax.toggle_label(True)
- cax.axis[cax.orientation].set_label('Foo')
-
- # This affects all axes because we set share_all = True.
- grid.axes_llc.set_xticks([-2, 0, 2])
- grid.axes_llc.set_yticks([-2, 0, 2])
-
-
- if 1:
- F = plt.figure(1, (5.5, 2.5))
-
- F.subplots_adjust(left=0.05, right=0.93)
-
- demo_bottom_cbar(F)
- demo_right_cbar(F)
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_edge_colorbar.txt b/_sources/examples/axes_grid/demo_edge_colorbar.txt
deleted file mode 100644
index 1e4553ec5d0..00000000000
--- a/_sources/examples/axes_grid/demo_edge_colorbar.txt
+++ /dev/null
@@ -1,102 +0,0 @@
-.. _axes_grid-demo_edge_colorbar:
-
-axes_grid example code: demo_edge_colorbar.py
-=============================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/demo_edge_colorbar.py
-
-::
-
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1 import AxesGrid
-
-
- def get_demo_image():
- import numpy as np
- from matplotlib.cbook import get_sample_data
- f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False)
- z = np.load(f)
- # z is a numpy array of 15x15
- return z, (-3, 4, -4, 3)
-
-
- def demo_bottom_cbar(fig):
- """
- A grid of 2x2 images with a colorbar for each column.
- """
- grid = AxesGrid(fig, 121, # similar to subplot(132)
- nrows_ncols=(2, 2),
- axes_pad=0.10,
- share_all=True,
- label_mode="1",
- cbar_location="bottom",
- cbar_mode="edge",
- cbar_pad=0.25,
- cbar_size="15%",
- direction="column"
- )
-
- Z, extent = get_demo_image()
- cmaps = [plt.get_cmap("autumn"), plt.get_cmap("summer")]
- for i in range(4):
- im = grid[i].imshow(Z, extent=extent, interpolation="nearest",
- cmap=cmaps[i//2])
- if i % 2:
- cbar = grid.cbar_axes[i//2].colorbar(im)
-
- for cax in grid.cbar_axes:
- cax.toggle_label(True)
- cax.axis[cax.orientation].set_label("Bar")
-
- # This affects all axes as share_all = True.
- grid.axes_llc.set_xticks([-2, 0, 2])
- grid.axes_llc.set_yticks([-2, 0, 2])
-
-
- def demo_right_cbar(fig):
- """
- A grid of 2x2 images. Each row has its own colorbar.
- """
-
- grid = AxesGrid(F, 122, # similar to subplot(122)
- nrows_ncols=(2, 2),
- axes_pad=0.10,
- label_mode="1",
- share_all=True,
- cbar_location="right",
- cbar_mode="edge",
- cbar_size="7%",
- cbar_pad="2%",
- )
- Z, extent = get_demo_image()
- cmaps = [plt.get_cmap("spring"), plt.get_cmap("winter")]
- for i in range(4):
- im = grid[i].imshow(Z, extent=extent, interpolation="nearest",
- cmap=cmaps[i//2])
- if i % 2:
- grid.cbar_axes[i//2].colorbar(im)
-
- for cax in grid.cbar_axes:
- cax.toggle_label(True)
- cax.axis[cax.orientation].set_label('Foo')
-
- # This affects all axes because we set share_all = True.
- grid.axes_llc.set_xticks([-2, 0, 2])
- grid.axes_llc.set_yticks([-2, 0, 2])
-
-
- if 1:
- F = plt.figure(1, (5.5, 2.5))
-
- F.subplots_adjust(left=0.05, right=0.93)
-
- demo_bottom_cbar(F)
- demo_right_cbar(F)
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_floating_axes.rst.txt b/_sources/examples/axes_grid/demo_floating_axes.rst.txt
deleted file mode 100644
index 62a8a413f9e..00000000000
--- a/_sources/examples/axes_grid/demo_floating_axes.rst.txt
+++ /dev/null
@@ -1,168 +0,0 @@
-.. _axes_grid-demo_floating_axes:
-
-axes_grid example code: demo_floating_axes.py
-=============================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/demo_floating_axes.py
-
-::
-
- """
- Demo of the floating axes.
-
- This demo shows features of functions in floating_axes:
- * Using scatter function and bar function with changing the
- shape of the plot.
- * Using GridHelperCurveLinear to rotate the plot and set the
- boundary of the plot.
- * Using FloatingSubplot to create a subplot using the return
- value from GridHelperCurveLinear.
- * Making sector plot by adding more features to GridHelperCurveLinear.
- """
- from matplotlib.transforms import Affine2D
- import mpl_toolkits.axisartist.floating_axes as floating_axes
- import numpy as np
- import mpl_toolkits.axisartist.angle_helper as angle_helper
- from matplotlib.projections import PolarAxes
- from mpl_toolkits.axisartist.grid_finder import (FixedLocator, MaxNLocator,
- DictFormatter)
- import matplotlib.pyplot as plt
-
-
- def setup_axes1(fig, rect):
- """
- A simple one.
- """
- tr = Affine2D().scale(2, 1).rotate_deg(30)
-
- grid_helper = floating_axes.GridHelperCurveLinear(
- tr, extremes=(-0.5, 3.5, 0, 4))
-
- ax1 = floating_axes.FloatingSubplot(fig, rect, grid_helper=grid_helper)
- fig.add_subplot(ax1)
-
- aux_ax = ax1.get_aux_axes(tr)
-
- grid_helper.grid_finder.grid_locator1._nbins = 4
- grid_helper.grid_finder.grid_locator2._nbins = 4
-
- return ax1, aux_ax
-
-
- def setup_axes2(fig, rect):
- """
- With custom locator and formatter.
- Note that the extreme values are swapped.
- """
- tr = PolarAxes.PolarTransform()
-
- pi = np.pi
- angle_ticks = [(0, r"$0$"),
- (.25*pi, r"$\frac{1}{4}\pi$"),
- (.5*pi, r"$\frac{1}{2}\pi$")]
- grid_locator1 = FixedLocator([v for v, s in angle_ticks])
- tick_formatter1 = DictFormatter(dict(angle_ticks))
-
- grid_locator2 = MaxNLocator(2)
-
- grid_helper = floating_axes.GridHelperCurveLinear(
- tr, extremes=(.5*pi, 0, 2, 1),
- grid_locator1=grid_locator1,
- grid_locator2=grid_locator2,
- tick_formatter1=tick_formatter1,
- tick_formatter2=None)
-
- ax1 = floating_axes.FloatingSubplot(fig, rect, grid_helper=grid_helper)
- fig.add_subplot(ax1)
-
- # create a parasite axes whose transData in RA, cz
- aux_ax = ax1.get_aux_axes(tr)
-
- aux_ax.patch = ax1.patch # for aux_ax to have a clip path as in ax
- ax1.patch.zorder = 0.9 # but this has a side effect that the patch is
- # drawn twice, and possibly over some other
- # artists. So, we decrease the zorder a bit to
- # prevent this.
-
- return ax1, aux_ax
-
-
- def setup_axes3(fig, rect):
- """
- Sometimes, things like axis_direction need to be adjusted.
- """
-
- # rotate a bit for better orientation
- tr_rotate = Affine2D().translate(-95, 0)
-
- # scale degree to radians
- tr_scale = Affine2D().scale(np.pi/180., 1.)
-
- tr = tr_rotate + tr_scale + PolarAxes.PolarTransform()
-
- grid_locator1 = angle_helper.LocatorHMS(4)
- tick_formatter1 = angle_helper.FormatterHMS()
-
- grid_locator2 = MaxNLocator(3)
-
- ra0, ra1 = 8.*15, 14.*15
- cz0, cz1 = 0, 14000
- grid_helper = floating_axes.GridHelperCurveLinear(
- tr, extremes=(ra0, ra1, cz0, cz1),
- grid_locator1=grid_locator1,
- grid_locator2=grid_locator2,
- tick_formatter1=tick_formatter1,
- tick_formatter2=None)
-
- ax1 = floating_axes.FloatingSubplot(fig, rect, grid_helper=grid_helper)
- fig.add_subplot(ax1)
-
- # adjust axis
- ax1.axis["left"].set_axis_direction("bottom")
- ax1.axis["right"].set_axis_direction("top")
-
- ax1.axis["bottom"].set_visible(False)
- ax1.axis["top"].set_axis_direction("bottom")
- ax1.axis["top"].toggle(ticklabels=True, label=True)
- ax1.axis["top"].major_ticklabels.set_axis_direction("top")
- ax1.axis["top"].label.set_axis_direction("top")
-
- ax1.axis["left"].label.set_text(r"cz [km$^{-1}$]")
- ax1.axis["top"].label.set_text(r"$\alpha_{1950}$")
-
- # create a parasite axes whose transData in RA, cz
- aux_ax = ax1.get_aux_axes(tr)
-
- aux_ax.patch = ax1.patch # for aux_ax to have a clip path as in ax
- ax1.patch.zorder = 0.9 # but this has a side effect that the patch is
- # drawn twice, and possibly over some other
- # artists. So, we decrease the zorder a bit to
- # prevent this.
-
- return ax1, aux_ax
-
-
- ##########################################################
- fig = plt.figure(1, figsize=(8, 4))
- fig.subplots_adjust(wspace=0.3, left=0.05, right=0.95)
-
- ax1, aux_ax1 = setup_axes1(fig, 131)
- aux_ax1.bar([0, 1, 2, 3], [3, 2, 1, 3])
-
- ax2, aux_ax2 = setup_axes2(fig, 132)
- theta = np.random.rand(10)*.5*np.pi
- radius = np.random.rand(10) + 1.
- aux_ax2.scatter(theta, radius)
-
- ax3, aux_ax3 = setup_axes3(fig, 133)
-
- theta = (8 + np.random.rand(10)*(14 - 8))*15. # in degrees
- radius = np.random.rand(10)*14000.
- aux_ax3.scatter(theta, radius)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_floating_axes.txt b/_sources/examples/axes_grid/demo_floating_axes.txt
deleted file mode 100644
index 40d2736b6ae..00000000000
--- a/_sources/examples/axes_grid/demo_floating_axes.txt
+++ /dev/null
@@ -1,156 +0,0 @@
-.. _axes_grid-demo_floating_axes:
-
-axes_grid example code: demo_floating_axes.py
-=============================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/demo_floating_axes.py
-
-::
-
- from matplotlib.transforms import Affine2D
- import mpl_toolkits.axisartist.floating_axes as floating_axes
- import numpy as np
- import mpl_toolkits.axisartist.angle_helper as angle_helper
- from matplotlib.projections import PolarAxes
- from mpl_toolkits.axisartist.grid_finder import (FixedLocator, MaxNLocator,
- DictFormatter)
- import matplotlib.pyplot as plt
-
-
- def setup_axes1(fig, rect):
- """
- A simple one.
- """
- tr = Affine2D().scale(2, 1).rotate_deg(30)
-
- grid_helper = floating_axes.GridHelperCurveLinear(
- tr, extremes=(0, 4, 0, 4))
-
- ax1 = floating_axes.FloatingSubplot(fig, rect, grid_helper=grid_helper)
- fig.add_subplot(ax1)
-
- aux_ax = ax1.get_aux_axes(tr)
-
- grid_helper.grid_finder.grid_locator1._nbins = 4
- grid_helper.grid_finder.grid_locator2._nbins = 4
-
- return ax1, aux_ax
-
-
- def setup_axes2(fig, rect):
- """
- With custom locator and formatter.
- Note that the extreme values are swapped.
- """
- tr = PolarAxes.PolarTransform()
-
- pi = np.pi
- angle_ticks = [(0, r"$0$"),
- (.25*pi, r"$\frac{1}{4}\pi$"),
- (.5*pi, r"$\frac{1}{2}\pi$")]
- grid_locator1 = FixedLocator([v for v, s in angle_ticks])
- tick_formatter1 = DictFormatter(dict(angle_ticks))
-
- grid_locator2 = MaxNLocator(2)
-
- grid_helper = floating_axes.GridHelperCurveLinear(
- tr, extremes=(.5*pi, 0, 2, 1),
- grid_locator1=grid_locator1,
- grid_locator2=grid_locator2,
- tick_formatter1=tick_formatter1,
- tick_formatter2=None)
-
- ax1 = floating_axes.FloatingSubplot(fig, rect, grid_helper=grid_helper)
- fig.add_subplot(ax1)
-
- # create a parasite axes whose transData in RA, cz
- aux_ax = ax1.get_aux_axes(tr)
-
- aux_ax.patch = ax1.patch # for aux_ax to have a clip path as in ax
- ax1.patch.zorder = 0.9 # but this has a side effect that the patch is
- # drawn twice, and possibly over some other
- # artists. So, we decrease the zorder a bit to
- # prevent this.
-
- return ax1, aux_ax
-
-
- def setup_axes3(fig, rect):
- """
- Sometimes, things like axis_direction need to be adjusted.
- """
-
- # rotate a bit for better orientation
- tr_rotate = Affine2D().translate(-95, 0)
-
- # scale degree to radians
- tr_scale = Affine2D().scale(np.pi/180., 1.)
-
- tr = tr_rotate + tr_scale + PolarAxes.PolarTransform()
-
- grid_locator1 = angle_helper.LocatorHMS(4)
- tick_formatter1 = angle_helper.FormatterHMS()
-
- grid_locator2 = MaxNLocator(3)
-
- ra0, ra1 = 8.*15, 14.*15
- cz0, cz1 = 0, 14000
- grid_helper = floating_axes.GridHelperCurveLinear(
- tr, extremes=(ra0, ra1, cz0, cz1),
- grid_locator1=grid_locator1,
- grid_locator2=grid_locator2,
- tick_formatter1=tick_formatter1,
- tick_formatter2=None)
-
- ax1 = floating_axes.FloatingSubplot(fig, rect, grid_helper=grid_helper)
- fig.add_subplot(ax1)
-
- # adjust axis
- ax1.axis["left"].set_axis_direction("bottom")
- ax1.axis["right"].set_axis_direction("top")
-
- ax1.axis["bottom"].set_visible(False)
- ax1.axis["top"].set_axis_direction("bottom")
- ax1.axis["top"].toggle(ticklabels=True, label=True)
- ax1.axis["top"].major_ticklabels.set_axis_direction("top")
- ax1.axis["top"].label.set_axis_direction("top")
-
- ax1.axis["left"].label.set_text(r"cz [km$^{-1}$]")
- ax1.axis["top"].label.set_text(r"$\alpha_{1950}$")
-
- # create a parasite axes whose transData in RA, cz
- aux_ax = ax1.get_aux_axes(tr)
-
- aux_ax.patch = ax1.patch # for aux_ax to have a clip path as in ax
- ax1.patch.zorder = 0.9 # but this has a side effect that the patch is
- # drawn twice, and possibly over some other
- # artists. So, we decrease the zorder a bit to
- # prevent this.
-
- return ax1, aux_ax
-
-
- ##########################################################
- fig = plt.figure(1, figsize=(8, 4))
- fig.subplots_adjust(wspace=0.3, left=0.05, right=0.95)
-
- ax1, aux_ax1 = setup_axes1(fig, 131)
- aux_ax1.bar([0, 1, 2, 3], [3, 2, 1, 3])
-
- ax2, aux_ax2 = setup_axes2(fig, 132)
- theta = np.random.rand(10)*.5*np.pi
- radius = np.random.rand(10) + 1.
- aux_ax2.scatter(theta, radius)
-
- ax3, aux_ax3 = setup_axes3(fig, 133)
-
- theta = (8 + np.random.rand(10)*(14 - 8))*15. # in degrees
- radius = np.random.rand(10)*14000.
- aux_ax3.scatter(theta, radius)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_floating_axis.rst.txt b/_sources/examples/axes_grid/demo_floating_axis.rst.txt
deleted file mode 100644
index 08fb628c04f..00000000000
--- a/_sources/examples/axes_grid/demo_floating_axis.rst.txt
+++ /dev/null
@@ -1,84 +0,0 @@
-.. _axes_grid-demo_floating_axis:
-
-axes_grid example code: demo_floating_axis.py
-=============================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/demo_floating_axis.py
-
-::
-
- """
- Axis within rectangular frame
-
- The following code demonstrates how to put a floating polar curve within a
- rectangular box. In order to get a better sense of polar curves, please look at
- demo_curvelinear_grid.py.
- """
- import numpy as np
- import matplotlib.pyplot as plt
- import mpl_toolkits.axisartist.angle_helper as angle_helper
- from matplotlib.projections import PolarAxes
- from matplotlib.transforms import Affine2D
- from mpl_toolkits.axisartist import SubplotHost
- from mpl_toolkits.axisartist import GridHelperCurveLinear
-
-
- def curvelinear_test2(fig):
- """
- polar projection, but in a rectangular box.
- """
- global ax1
- # see demo_curvelinear_grid.py for details
- tr = Affine2D().scale(np.pi / 180., 1.) + PolarAxes.PolarTransform()
-
- extreme_finder = angle_helper.ExtremeFinderCycle(20,
- 20,
- lon_cycle=360,
- lat_cycle=None,
- lon_minmax=None,
- lat_minmax=(0,
- np.inf),
- )
-
- grid_locator1 = angle_helper.LocatorDMS(12)
-
- tick_formatter1 = angle_helper.FormatterDMS()
-
- grid_helper = GridHelperCurveLinear(tr,
- extreme_finder=extreme_finder,
- grid_locator1=grid_locator1,
- tick_formatter1=tick_formatter1
- )
-
- ax1 = SubplotHost(fig, 1, 1, 1, grid_helper=grid_helper)
-
- fig.add_subplot(ax1)
-
- # Now creates floating axis
-
- # floating axis whose first coordinate (theta) is fixed at 60
- ax1.axis["lat"] = axis = ax1.new_floating_axis(0, 60)
- axis.label.set_text(r"$\theta = 60^{\circ}$")
- axis.label.set_visible(True)
-
- # floating axis whose second coordinate (r) is fixed at 6
- ax1.axis["lon"] = axis = ax1.new_floating_axis(1, 6)
- axis.label.set_text(r"$r = 6$")
-
- ax1.set_aspect(1.)
- ax1.set_xlim(-5, 12)
- ax1.set_ylim(-5, 10)
-
- ax1.grid(True)
-
- fig = plt.figure(1, figsize=(5, 5))
- fig.clf()
-
- curvelinear_test2(fig)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_floating_axis.txt b/_sources/examples/axes_grid/demo_floating_axis.txt
deleted file mode 100644
index 25b454f79ce..00000000000
--- a/_sources/examples/axes_grid/demo_floating_axis.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-.. _axes_grid-demo_floating_axis:
-
-axes_grid example code: demo_floating_axis.py
-=============================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/demo_floating_axis.py
-
-::
-
- """
- An experimental support for curvilinear grid.
- """
-
-
- def curvelinear_test2(fig):
- """
- polar projection, but in a rectangular box.
- """
- global ax1
- import numpy as np
- import mpl_toolkits.axisartist.angle_helper as angle_helper
- from matplotlib.projections import PolarAxes
- from matplotlib.transforms import Affine2D
-
- from mpl_toolkits.axisartist import SubplotHost
-
- from mpl_toolkits.axisartist import GridHelperCurveLinear
-
- # see demo_curvelinear_grid.py for details
- tr = Affine2D().scale(np.pi/180., 1.) + PolarAxes.PolarTransform()
-
- extreme_finder = angle_helper.ExtremeFinderCycle(20, 20,
- lon_cycle=360,
- lat_cycle=None,
- lon_minmax=None,
- lat_minmax=(0, np.inf),
- )
-
- grid_locator1 = angle_helper.LocatorDMS(12)
-
- tick_formatter1 = angle_helper.FormatterDMS()
-
- grid_helper = GridHelperCurveLinear(tr,
- extreme_finder=extreme_finder,
- grid_locator1=grid_locator1,
- tick_formatter1=tick_formatter1
- )
-
- ax1 = SubplotHost(fig, 1, 1, 1, grid_helper=grid_helper)
-
- fig.add_subplot(ax1)
-
- # Now creates floating axis
-
- #grid_helper = ax1.get_grid_helper()
- # floating axis whose first coordinate (theta) is fixed at 60
- ax1.axis["lat"] = axis = ax1.new_floating_axis(0, 60)
- axis.label.set_text(r"$\theta = 60^{\circ}$")
- axis.label.set_visible(True)
-
- # floating axis whose second coordinate (r) is fixed at 6
- ax1.axis["lon"] = axis = ax1.new_floating_axis(1, 6)
- axis.label.set_text(r"$r = 6$")
-
- ax1.set_aspect(1.)
- ax1.set_xlim(-5, 12)
- ax1.set_ylim(-5, 10)
-
- ax1.grid(True)
-
- import matplotlib.pyplot as plt
- fig = plt.figure(1, figsize=(5, 5))
- fig.clf()
-
- curvelinear_test2(fig)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_imagegrid_aspect.rst.txt b/_sources/examples/axes_grid/demo_imagegrid_aspect.rst.txt
deleted file mode 100644
index 73db4844828..00000000000
--- a/_sources/examples/axes_grid/demo_imagegrid_aspect.rst.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-.. _axes_grid-demo_imagegrid_aspect:
-
-axes_grid example code: demo_imagegrid_aspect.py
-================================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/demo_imagegrid_aspect.py
-
-::
-
- import matplotlib.pyplot as plt
-
- from mpl_toolkits.axes_grid1 import ImageGrid
- fig = plt.figure(1)
-
- grid1 = ImageGrid(fig, 121, (2, 2), axes_pad=0.1,
- aspect=True, share_all=True)
-
- for i in [0, 1]:
- grid1[i].set_aspect(2)
-
-
- grid2 = ImageGrid(fig, 122, (2, 2), axes_pad=0.1,
- aspect=True, share_all=True)
-
-
- for i in [1, 3]:
- grid2[i].set_aspect(2)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_imagegrid_aspect.txt b/_sources/examples/axes_grid/demo_imagegrid_aspect.txt
deleted file mode 100644
index 84cf6178406..00000000000
--- a/_sources/examples/axes_grid/demo_imagegrid_aspect.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-.. _axes_grid-demo_imagegrid_aspect:
-
-axes_grid example code: demo_imagegrid_aspect.py
-================================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/demo_imagegrid_aspect.py
-
-::
-
- import matplotlib.pyplot as plt
-
- from mpl_toolkits.axes_grid1 import ImageGrid
- fig = plt.figure(1)
-
- grid1 = ImageGrid(fig, 121, (2, 2), axes_pad=0.1,
- aspect=True, share_all=True)
-
- for i in [0, 1]:
- grid1[i].set_aspect(2)
-
-
- grid2 = ImageGrid(fig, 122, (2, 2), axes_pad=0.1,
- aspect=True, share_all=True)
-
-
- for i in [1, 3]:
- grid2[i].set_aspect(2)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_parasite_axes2.rst.txt b/_sources/examples/axes_grid/demo_parasite_axes2.rst.txt
deleted file mode 100644
index 9d40847cb3a..00000000000
--- a/_sources/examples/axes_grid/demo_parasite_axes2.rst.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-.. _axes_grid-demo_parasite_axes2:
-
-axes_grid example code: demo_parasite_axes2.py
-==============================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/demo_parasite_axes2.py
-
-::
-
- """
- Parasite axis demo
-
- The following code is an example of a parasite axis. It aims to show a user how
- to plot multiple different values onto one single plot. Notice how in this
- example, par1 and par2 are both calling twinx meaning both are tied directly to
- the x-axis. From there, each of those two axis can behave separately from the
- each other, meaning they can take on separate values from themselves as well as
- the x-axis.
- """
- from mpl_toolkits.axes_grid1 import host_subplot
- import mpl_toolkits.axisartist as AA
- import matplotlib.pyplot as plt
-
- host = host_subplot(111, axes_class=AA.Axes)
- plt.subplots_adjust(right=0.75)
-
- par1 = host.twinx()
- par2 = host.twinx()
-
- offset = 60
- new_fixed_axis = par2.get_grid_helper().new_fixed_axis
- par2.axis["right"] = new_fixed_axis(loc="right",
- axes=par2,
- offset=(offset, 0))
-
- par2.axis["right"].toggle(all=True)
-
- host.set_xlim(0, 2)
- host.set_ylim(0, 2)
-
- host.set_xlabel("Distance")
- host.set_ylabel("Density")
- par1.set_ylabel("Temperature")
- par2.set_ylabel("Velocity")
-
- p1, = host.plot([0, 1, 2], [0, 1, 2], label="Density")
- p2, = par1.plot([0, 1, 2], [0, 3, 2], label="Temperature")
- p3, = par2.plot([0, 1, 2], [50, 30, 15], label="Velocity")
-
- par1.set_ylim(0, 4)
- par2.set_ylim(1, 65)
-
- host.legend()
-
- host.axis["left"].label.set_color(p1.get_color())
- par1.axis["right"].label.set_color(p2.get_color())
- par2.axis["right"].label.set_color(p3.get_color())
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/demo_parasite_axes2.txt b/_sources/examples/axes_grid/demo_parasite_axes2.txt
deleted file mode 100644
index 2e5ed0ef6ef..00000000000
--- a/_sources/examples/axes_grid/demo_parasite_axes2.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-.. _axes_grid-demo_parasite_axes2:
-
-axes_grid example code: demo_parasite_axes2.py
-==============================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/demo_parasite_axes2.py
-
-::
-
- from mpl_toolkits.axes_grid1 import host_subplot
- import mpl_toolkits.axisartist as AA
- import matplotlib.pyplot as plt
-
- if 1:
-
- host = host_subplot(111, axes_class=AA.Axes)
- plt.subplots_adjust(right=0.75)
-
- par1 = host.twinx()
- par2 = host.twinx()
-
- offset = 60
- new_fixed_axis = par2.get_grid_helper().new_fixed_axis
- par2.axis["right"] = new_fixed_axis(loc="right",
- axes=par2,
- offset=(offset, 0))
-
- par2.axis["right"].toggle(all=True)
-
- host.set_xlim(0, 2)
- host.set_ylim(0, 2)
-
- host.set_xlabel("Distance")
- host.set_ylabel("Density")
- par1.set_ylabel("Temperature")
- par2.set_ylabel("Velocity")
-
- p1, = host.plot([0, 1, 2], [0, 1, 2], label="Density")
- p2, = par1.plot([0, 1, 2], [0, 3, 2], label="Temperature")
- p3, = par2.plot([0, 1, 2], [50, 30, 15], label="Velocity")
-
- par1.set_ylim(0, 4)
- par2.set_ylim(1, 65)
-
- host.legend()
-
- host.axis["left"].label.set_color(p1.get_color())
- par1.axis["right"].label.set_color(p2.get_color())
- par2.axis["right"].label.set_color(p3.get_color())
-
- plt.draw()
- plt.show()
-
- #plt.savefig("Test")
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/index.rst.txt b/_sources/examples/axes_grid/index.rst.txt
deleted file mode 100644
index ee9a7c36c76..00000000000
--- a/_sources/examples/axes_grid/index.rst.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-.. _axes_grid-examples-index:
-
-##############################################
-axes_grid Examples
-##############################################
-
-.. htmlonly::
-
- :Release: |version|
- :Date: |today|
-
-.. toctree::
- :maxdepth: 1
-
- demo_axes_divider
- demo_axes_grid
- demo_axes_grid2
- demo_axes_hbox_divider
- demo_axes_rgb
- demo_axisline_style
- demo_colorbar_with_inset_locator
- demo_curvelinear_grid
- demo_curvelinear_grid2
- demo_edge_colorbar
- demo_floating_axes
- demo_floating_axis
- demo_imagegrid_aspect
- demo_parasite_axes2
- inset_locator_demo
- inset_locator_demo2
- make_room_for_ylabel_using_axesgrid
- parasite_simple2
- scatter_hist
- simple_anchored_artists
- simple_axesgrid
- simple_axesgrid2
- simple_axisline4
diff --git a/_sources/examples/axes_grid/index.txt b/_sources/examples/axes_grid/index.txt
deleted file mode 100644
index ee9a7c36c76..00000000000
--- a/_sources/examples/axes_grid/index.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-.. _axes_grid-examples-index:
-
-##############################################
-axes_grid Examples
-##############################################
-
-.. htmlonly::
-
- :Release: |version|
- :Date: |today|
-
-.. toctree::
- :maxdepth: 1
-
- demo_axes_divider
- demo_axes_grid
- demo_axes_grid2
- demo_axes_hbox_divider
- demo_axes_rgb
- demo_axisline_style
- demo_colorbar_with_inset_locator
- demo_curvelinear_grid
- demo_curvelinear_grid2
- demo_edge_colorbar
- demo_floating_axes
- demo_floating_axis
- demo_imagegrid_aspect
- demo_parasite_axes2
- inset_locator_demo
- inset_locator_demo2
- make_room_for_ylabel_using_axesgrid
- parasite_simple2
- scatter_hist
- simple_anchored_artists
- simple_axesgrid
- simple_axesgrid2
- simple_axisline4
diff --git a/_sources/examples/axes_grid/inset_locator_demo.rst.txt b/_sources/examples/axes_grid/inset_locator_demo.rst.txt
deleted file mode 100644
index 3cfd2f59f79..00000000000
--- a/_sources/examples/axes_grid/inset_locator_demo.rst.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-.. _axes_grid-inset_locator_demo:
-
-axes_grid example code: inset_locator_demo.py
-=============================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/inset_locator_demo.py
-
-::
-
- import matplotlib.pyplot as plt
-
- from mpl_toolkits.axes_grid1.inset_locator import inset_axes, zoomed_inset_axes
- from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar
-
-
- def add_sizebar(ax, size):
- asb = AnchoredSizeBar(ax.transData,
- size,
- str(size),
- loc=8,
- pad=0.1, borderpad=0.5, sep=5,
- frameon=False)
- ax.add_artist(asb)
-
-
- fig, (ax, ax2) = plt.subplots(1, 2, figsize=[5.5, 3])
-
- # first subplot
- ax.set_aspect(1.)
-
- axins = inset_axes(ax,
- width="30%", # width = 30% of parent_bbox
- height=1., # height : 1 inch
- loc=3)
-
- plt.xticks(visible=False)
- plt.yticks(visible=False)
-
-
- # second subplot
- ax2.set_aspect(1.)
-
- axins = zoomed_inset_axes(ax2, 0.5, loc=1) # zoom = 0.5
- # fix the number of ticks on the inset axes
- axins.yaxis.get_major_locator().set_params(nbins=7)
- axins.xaxis.get_major_locator().set_params(nbins=7)
-
- plt.xticks(visible=False)
- plt.yticks(visible=False)
-
- add_sizebar(ax2, 0.5)
- add_sizebar(axins, 0.5)
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/inset_locator_demo.txt b/_sources/examples/axes_grid/inset_locator_demo.txt
deleted file mode 100644
index c0699b425af..00000000000
--- a/_sources/examples/axes_grid/inset_locator_demo.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-.. _axes_grid-inset_locator_demo:
-
-axes_grid example code: inset_locator_demo.py
-=============================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/inset_locator_demo.py
-
-::
-
- import matplotlib.pyplot as plt
-
- from mpl_toolkits.axes_grid1.inset_locator import inset_axes, zoomed_inset_axes
- from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar
-
-
- def add_sizebar(ax, size):
- asb = AnchoredSizeBar(ax.transData,
- size,
- str(size),
- loc=8,
- pad=0.1, borderpad=0.5, sep=5,
- frameon=False)
- ax.add_artist(asb)
-
-
- fig, (ax, ax2) = plt.subplots(1, 2, figsize=[5.5, 3])
-
- # first subplot
- ax.set_aspect(1.)
-
- axins = inset_axes(ax,
- width="30%", # width = 30% of parent_bbox
- height=1., # height : 1 inch
- loc=3)
-
- plt.xticks(visible=False)
- plt.yticks(visible=False)
-
-
- # second subplot
- ax2.set_aspect(1.)
-
- axins = zoomed_inset_axes(ax2, 0.5, loc=1) # zoom = 0.5
-
- plt.xticks(visible=False)
- plt.yticks(visible=False)
-
- add_sizebar(ax2, 0.5)
- add_sizebar(axins, 0.5)
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/inset_locator_demo2.rst.txt b/_sources/examples/axes_grid/inset_locator_demo2.rst.txt
deleted file mode 100644
index 9f8399414ef..00000000000
--- a/_sources/examples/axes_grid/inset_locator_demo2.rst.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-.. _axes_grid-inset_locator_demo2:
-
-axes_grid example code: inset_locator_demo2.py
-==============================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/inset_locator_demo2.py
-
-::
-
- import matplotlib.pyplot as plt
-
- from mpl_toolkits.axes_grid1.inset_locator import zoomed_inset_axes
- from mpl_toolkits.axes_grid1.inset_locator import mark_inset
-
- import numpy as np
-
-
- def get_demo_image():
- from matplotlib.cbook import get_sample_data
- import numpy as np
- f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False)
- z = np.load(f)
- # z is a numpy array of 15x15
- return z, (-3, 4, -4, 3)
-
- fig, ax = plt.subplots(figsize=[5, 4])
-
- # prepare the demo image
- Z, extent = get_demo_image()
- Z2 = np.zeros([150, 150], dtype="d")
- ny, nx = Z.shape
- Z2[30:30 + ny, 30:30 + nx] = Z
-
- # extent = [-3, 4, -4, 3]
- ax.imshow(Z2, extent=extent, interpolation="nearest",
- origin="lower")
-
- axins = zoomed_inset_axes(ax, 6, loc=1) # zoom = 6
- axins.imshow(Z2, extent=extent, interpolation="nearest",
- origin="lower")
-
- # sub region of the original image
- x1, x2, y1, y2 = -1.5, -0.9, -2.5, -1.9
- axins.set_xlim(x1, x2)
- axins.set_ylim(y1, y2)
- # fix the number of ticks on the inset axes
- axins.yaxis.get_major_locator().set_params(nbins=7)
- axins.xaxis.get_major_locator().set_params(nbins=7)
-
- plt.xticks(visible=False)
- plt.yticks(visible=False)
-
- # draw a bbox of the region of the inset axes in the parent axes and
- # connecting lines between the bbox and the inset axes area
- mark_inset(ax, axins, loc1=2, loc2=4, fc="none", ec="0.5")
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/inset_locator_demo2.txt b/_sources/examples/axes_grid/inset_locator_demo2.txt
deleted file mode 100644
index 5a5dc93f020..00000000000
--- a/_sources/examples/axes_grid/inset_locator_demo2.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-.. _axes_grid-inset_locator_demo2:
-
-axes_grid example code: inset_locator_demo2.py
-==============================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/inset_locator_demo2.py
-
-::
-
- import matplotlib.pyplot as plt
-
- from mpl_toolkits.axes_grid1.inset_locator import zoomed_inset_axes
- from mpl_toolkits.axes_grid1.inset_locator import mark_inset
-
- import numpy as np
-
-
- def get_demo_image():
- from matplotlib.cbook import get_sample_data
- import numpy as np
- f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False)
- z = np.load(f)
- # z is a numpy array of 15x15
- return z, (-3, 4, -4, 3)
-
- fig, ax = plt.subplots(figsize=[5, 4])
-
- # prepare the demo image
- Z, extent = get_demo_image()
- Z2 = np.zeros([150, 150], dtype="d")
- ny, nx = Z.shape
- Z2[30:30 + ny, 30:30 + nx] = Z
-
- # extent = [-3, 4, -4, 3]
- ax.imshow(Z2, extent=extent, interpolation="nearest",
- origin="lower")
-
- axins = zoomed_inset_axes(ax, 6, loc=1) # zoom = 6
- axins.imshow(Z2, extent=extent, interpolation="nearest",
- origin="lower")
-
- # sub region of the original image
- x1, x2, y1, y2 = -1.5, -0.9, -2.5, -1.9
- axins.set_xlim(x1, x2)
- axins.set_ylim(y1, y2)
-
- plt.xticks(visible=False)
- plt.yticks(visible=False)
-
- # draw a bbox of the region of the inset axes in the parent axes and
- # connecting lines between the bbox and the inset axes area
- mark_inset(ax, axins, loc1=2, loc2=4, fc="none", ec="0.5")
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/make_room_for_ylabel_using_axesgrid.rst.txt b/_sources/examples/axes_grid/make_room_for_ylabel_using_axesgrid.rst.txt
deleted file mode 100644
index 9c367b5140a..00000000000
--- a/_sources/examples/axes_grid/make_room_for_ylabel_using_axesgrid.rst.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-.. _axes_grid-make_room_for_ylabel_using_axesgrid:
-
-axes_grid example code: make_room_for_ylabel_using_axesgrid.py
-==============================================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid.py
-
-::
-
- from mpl_toolkits.axes_grid1 import make_axes_locatable
- from mpl_toolkits.axes_grid1.axes_divider import make_axes_area_auto_adjustable
-
-
- if __name__ == "__main__":
-
- import matplotlib.pyplot as plt
-
- def ex1():
- plt.figure(1)
- ax = plt.axes([0, 0, 1, 1])
- #ax = plt.subplot(111)
-
- ax.set_yticks([0.5])
- ax.set_yticklabels(["very long label"])
-
- make_axes_area_auto_adjustable(ax)
-
- def ex2():
-
- plt.figure(2)
- ax1 = plt.axes([0, 0, 1, 0.5])
- ax2 = plt.axes([0, 0.5, 1, 0.5])
-
- ax1.set_yticks([0.5])
- ax1.set_yticklabels(["very long label"])
- ax1.set_ylabel("Y label")
-
- ax2.set_title("Title")
-
- make_axes_area_auto_adjustable(ax1, pad=0.1, use_axes=[ax1, ax2])
- make_axes_area_auto_adjustable(ax2, pad=0.1, use_axes=[ax1, ax2])
-
- def ex3():
-
- fig = plt.figure(3)
- ax1 = plt.axes([0, 0, 1, 1])
- divider = make_axes_locatable(ax1)
-
- ax2 = divider.new_horizontal("100%", pad=0.3, sharey=ax1)
- ax2.tick_params(labelleft="off")
- fig.add_axes(ax2)
-
- divider.add_auto_adjustable_area(use_axes=[ax1], pad=0.1,
- adjust_dirs=["left"])
- divider.add_auto_adjustable_area(use_axes=[ax2], pad=0.1,
- adjust_dirs=["right"])
- divider.add_auto_adjustable_area(use_axes=[ax1, ax2], pad=0.1,
- adjust_dirs=["top", "bottom"])
-
- ax1.set_yticks([0.5])
- ax1.set_yticklabels(["very long label"])
-
- ax2.set_title("Title")
- ax2.set_xlabel("X - Label")
-
- ex1()
- ex2()
- ex3()
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/make_room_for_ylabel_using_axesgrid.txt b/_sources/examples/axes_grid/make_room_for_ylabel_using_axesgrid.txt
deleted file mode 100644
index 3a06654cbc0..00000000000
--- a/_sources/examples/axes_grid/make_room_for_ylabel_using_axesgrid.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-.. _axes_grid-make_room_for_ylabel_using_axesgrid:
-
-axes_grid example code: make_room_for_ylabel_using_axesgrid.py
-==============================================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid.py
-
-::
-
- from mpl_toolkits.axes_grid1 import make_axes_locatable
- from mpl_toolkits.axes_grid1.axes_divider import make_axes_area_auto_adjustable
-
-
- if __name__ == "__main__":
-
- import matplotlib.pyplot as plt
-
- def ex1():
- plt.figure(1)
- ax = plt.axes([0, 0, 1, 1])
- #ax = plt.subplot(111)
-
- ax.set_yticks([0.5])
- ax.set_yticklabels(["very long label"])
-
- make_axes_area_auto_adjustable(ax)
-
- def ex2():
-
- plt.figure(2)
- ax1 = plt.axes([0, 0, 1, 0.5])
- ax2 = plt.axes([0, 0.5, 1, 0.5])
-
- ax1.set_yticks([0.5])
- ax1.set_yticklabels(["very long label"])
- ax1.set_ylabel("Y label")
-
- ax2.set_title("Title")
-
- make_axes_area_auto_adjustable(ax1, pad=0.1, use_axes=[ax1, ax2])
- make_axes_area_auto_adjustable(ax2, pad=0.1, use_axes=[ax1, ax2])
-
- def ex3():
-
- fig = plt.figure(3)
- ax1 = plt.axes([0, 0, 1, 1])
- divider = make_axes_locatable(ax1)
-
- ax2 = divider.new_horizontal("100%", pad=0.3, sharey=ax1)
- ax2.tick_params(labelleft="off")
- fig.add_axes(ax2)
-
- divider.add_auto_adjustable_area(use_axes=[ax1], pad=0.1,
- adjust_dirs=["left"])
- divider.add_auto_adjustable_area(use_axes=[ax2], pad=0.1,
- adjust_dirs=["right"])
- divider.add_auto_adjustable_area(use_axes=[ax1, ax2], pad=0.1,
- adjust_dirs=["top", "bottom"])
-
- ax1.set_yticks([0.5])
- ax1.set_yticklabels(["very long label"])
-
- ax2.set_title("Title")
- ax2.set_xlabel("X - Label")
-
- ex1()
- ex2()
- ex3()
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/parasite_simple2.rst.txt b/_sources/examples/axes_grid/parasite_simple2.rst.txt
deleted file mode 100644
index 281cbf280cf..00000000000
--- a/_sources/examples/axes_grid/parasite_simple2.rst.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-.. _axes_grid-parasite_simple2:
-
-axes_grid example code: parasite_simple2.py
-===========================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/parasite_simple2.py
-
-::
-
- import matplotlib.transforms as mtransforms
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1.parasite_axes import SubplotHost
-
- obs = [["01_S1", 3.88, 0.14, 1970, 63],
- ["01_S4", 5.6, 0.82, 1622, 150],
- ["02_S1", 2.4, 0.54, 1570, 40],
- ["03_S1", 4.1, 0.62, 2380, 170]]
-
-
- fig = plt.figure()
-
- ax_kms = SubplotHost(fig, 1, 1, 1, aspect=1.)
-
- # angular proper motion("/yr) to linear velocity(km/s) at distance=2.3kpc
- pm_to_kms = 1./206265.*2300*3.085e18/3.15e7/1.e5
-
- aux_trans = mtransforms.Affine2D().scale(pm_to_kms, 1.)
- ax_pm = ax_kms.twin(aux_trans)
- ax_pm.set_viewlim_mode("transform")
-
- fig.add_subplot(ax_kms)
-
- for n, ds, dse, w, we in obs:
- time = ((2007 + (10. + 4/30.)/12) - 1988.5)
- v = ds / time * pm_to_kms
- ve = dse / time * pm_to_kms
- ax_kms.errorbar([v], [w], xerr=[ve], yerr=[we], color="k")
-
-
- ax_kms.axis["bottom"].set_label("Linear velocity at 2.3 kpc [km/s]")
- ax_kms.axis["left"].set_label("FWHM [km/s]")
- ax_pm.axis["top"].set_label(r"Proper Motion [$''$/yr]")
- ax_pm.axis["top"].label.set_visible(True)
- ax_pm.axis["right"].major_ticklabels.set_visible(False)
-
- ax_kms.set_xlim(950, 3700)
- ax_kms.set_ylim(950, 3100)
- # xlim and ylim of ax_pms will be automatically adjusted.
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/parasite_simple2.txt b/_sources/examples/axes_grid/parasite_simple2.txt
deleted file mode 100644
index 44e52c4a162..00000000000
--- a/_sources/examples/axes_grid/parasite_simple2.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-.. _axes_grid-parasite_simple2:
-
-axes_grid example code: parasite_simple2.py
-===========================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/parasite_simple2.py
-
-::
-
- import matplotlib.transforms as mtransforms
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1.parasite_axes import SubplotHost
-
- obs = [["01_S1", 3.88, 0.14, 1970, 63],
- ["01_S4", 5.6, 0.82, 1622, 150],
- ["02_S1", 2.4, 0.54, 1570, 40],
- ["03_S1", 4.1, 0.62, 2380, 170]]
-
-
- fig = plt.figure()
-
- ax_kms = SubplotHost(fig, 1, 1, 1, aspect=1.)
-
- # angular proper motion("/yr) to linear velocity(km/s) at distance=2.3kpc
- pm_to_kms = 1./206265.*2300*3.085e18/3.15e7/1.e5
-
- aux_trans = mtransforms.Affine2D().scale(pm_to_kms, 1.)
- ax_pm = ax_kms.twin(aux_trans)
- ax_pm.set_viewlim_mode("transform")
-
- fig.add_subplot(ax_kms)
-
- for n, ds, dse, w, we in obs:
- time = ((2007 + (10. + 4/30.)/12) - 1988.5)
- v = ds / time * pm_to_kms
- ve = dse / time * pm_to_kms
- ax_kms.errorbar([v], [w], xerr=[ve], yerr=[we], color="k")
-
-
- ax_kms.axis["bottom"].set_label("Linear velocity at 2.3 kpc [km/s]")
- ax_kms.axis["left"].set_label("FWHM [km/s]")
- ax_pm.axis["top"].set_label(r"Proper Motion [$''$/yr]")
- ax_pm.axis["top"].label.set_visible(True)
- ax_pm.axis["right"].major_ticklabels.set_visible(False)
-
- ax_kms.set_xlim(950, 3700)
- ax_kms.set_ylim(950, 3100)
- # xlim and ylim of ax_pms will be automatically adjusted.
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/scatter_hist.rst.txt b/_sources/examples/axes_grid/scatter_hist.rst.txt
deleted file mode 100644
index 2413d9a0c00..00000000000
--- a/_sources/examples/axes_grid/scatter_hist.rst.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-.. _axes_grid-scatter_hist:
-
-axes_grid example code: scatter_hist.py
-=======================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/scatter_hist.py
-
-::
-
- import numpy as np
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1 import make_axes_locatable
-
- # the random data
- x = np.random.randn(1000)
- y = np.random.randn(1000)
-
-
- fig, axScatter = plt.subplots(figsize=(5.5, 5.5))
-
- # the scatter plot:
- axScatter.scatter(x, y)
- axScatter.set_aspect(1.)
-
- # create new axes on the right and on the top of the current axes
- # The first argument of the new_vertical(new_horizontal) method is
- # the height (width) of the axes to be created in inches.
- divider = make_axes_locatable(axScatter)
- axHistx = divider.append_axes("top", 1.2, pad=0.1, sharex=axScatter)
- axHisty = divider.append_axes("right", 1.2, pad=0.1, sharey=axScatter)
-
- # make some labels invisible
- plt.setp(axHistx.get_xticklabels() + axHisty.get_yticklabels(),
- visible=False)
-
- # now determine nice limits by hand:
- binwidth = 0.25
- xymax = np.max([np.max(np.fabs(x)), np.max(np.fabs(y))])
- lim = (int(xymax/binwidth) + 1)*binwidth
-
- bins = np.arange(-lim, lim + binwidth, binwidth)
- axHistx.hist(x, bins=bins)
- axHisty.hist(y, bins=bins, orientation='horizontal')
-
- # the xaxis of axHistx and yaxis of axHisty are shared with axScatter,
- # thus there is no need to manually adjust the xlim and ylim of these
- # axis.
-
- #axHistx.axis["bottom"].major_ticklabels.set_visible(False)
- for tl in axHistx.get_xticklabels():
- tl.set_visible(False)
- axHistx.set_yticks([0, 50, 100])
-
- #axHisty.axis["left"].major_ticklabels.set_visible(False)
- for tl in axHisty.get_yticklabels():
- tl.set_visible(False)
- axHisty.set_xticks([0, 50, 100])
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/scatter_hist.txt b/_sources/examples/axes_grid/scatter_hist.txt
deleted file mode 100644
index 38c65f65030..00000000000
--- a/_sources/examples/axes_grid/scatter_hist.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-.. _axes_grid-scatter_hist:
-
-axes_grid example code: scatter_hist.py
-=======================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/scatter_hist.py
-
-::
-
- import numpy as np
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1 import make_axes_locatable
-
- # the random data
- x = np.random.randn(1000)
- y = np.random.randn(1000)
-
-
- fig, axScatter = plt.subplots(figsize=(5.5, 5.5))
-
- # the scatter plot:
- axScatter.scatter(x, y)
- axScatter.set_aspect(1.)
-
- # create new axes on the right and on the top of the current axes
- # The first argument of the new_vertical(new_horizontal) method is
- # the height (width) of the axes to be created in inches.
- divider = make_axes_locatable(axScatter)
- axHistx = divider.append_axes("top", 1.2, pad=0.1, sharex=axScatter)
- axHisty = divider.append_axes("right", 1.2, pad=0.1, sharey=axScatter)
-
- # make some labels invisible
- plt.setp(axHistx.get_xticklabels() + axHisty.get_yticklabels(),
- visible=False)
-
- # now determine nice limits by hand:
- binwidth = 0.25
- xymax = np.max([np.max(np.fabs(x)), np.max(np.fabs(y))])
- lim = (int(xymax/binwidth) + 1)*binwidth
-
- bins = np.arange(-lim, lim + binwidth, binwidth)
- axHistx.hist(x, bins=bins)
- axHisty.hist(y, bins=bins, orientation='horizontal')
-
- # the xaxis of axHistx and yaxis of axHisty are shared with axScatter,
- # thus there is no need to manually adjust the xlim and ylim of these
- # axis.
-
- #axHistx.axis["bottom"].major_ticklabels.set_visible(False)
- for tl in axHistx.get_xticklabels():
- tl.set_visible(False)
- axHistx.set_yticks([0, 50, 100])
-
- #axHisty.axis["left"].major_ticklabels.set_visible(False)
- for tl in axHisty.get_yticklabels():
- tl.set_visible(False)
- axHisty.set_xticks([0, 50, 100])
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/simple_anchored_artists.rst.txt b/_sources/examples/axes_grid/simple_anchored_artists.rst.txt
deleted file mode 100644
index 6a0cf15d93f..00000000000
--- a/_sources/examples/axes_grid/simple_anchored_artists.rst.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-.. _axes_grid-simple_anchored_artists:
-
-axes_grid example code: simple_anchored_artists.py
-==================================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/simple_anchored_artists.py
-
-::
-
- import matplotlib.pyplot as plt
-
-
- def draw_text(ax):
- from matplotlib.offsetbox import AnchoredText
- at = AnchoredText("Figure 1a",
- loc=2, prop=dict(size=8), frameon=True,
- )
- at.patch.set_boxstyle("round,pad=0.,rounding_size=0.2")
- ax.add_artist(at)
-
- at2 = AnchoredText("Figure 1(b)",
- loc=3, prop=dict(size=8), frameon=True,
- bbox_to_anchor=(0., 1.),
- bbox_transform=ax.transAxes
- )
- at2.patch.set_boxstyle("round,pad=0.,rounding_size=0.2")
- ax.add_artist(at2)
-
-
- def draw_circle(ax): # circle in the canvas coordinate
- from mpl_toolkits.axes_grid1.anchored_artists import AnchoredDrawingArea
- from matplotlib.patches import Circle
- ada = AnchoredDrawingArea(20, 20, 0, 0,
- loc=1, pad=0., frameon=False)
- p = Circle((10, 10), 10)
- ada.da.add_artist(p)
- ax.add_artist(ada)
-
-
- def draw_ellipse(ax):
- from mpl_toolkits.axes_grid1.anchored_artists import AnchoredEllipse
- # draw an ellipse of width=0.1, height=0.15 in the data coordinate
- ae = AnchoredEllipse(ax.transData, width=0.1, height=0.15, angle=0.,
- loc=3, pad=0.5, borderpad=0.4, frameon=True)
-
- ax.add_artist(ae)
-
-
- def draw_sizebar(ax):
- from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar
- # draw a horizontal bar with length of 0.1 in Data coordinate
- # (ax.transData) with a label underneath.
- asb = AnchoredSizeBar(ax.transData,
- 0.1,
- r"1$^{\prime}$",
- loc=8,
- pad=0.1, borderpad=0.5, sep=5,
- frameon=False)
- ax.add_artist(asb)
-
-
- if 1:
- ax = plt.gca()
- ax.set_aspect(1.)
-
- draw_text(ax)
- draw_circle(ax)
- draw_ellipse(ax)
- draw_sizebar(ax)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/simple_anchored_artists.txt b/_sources/examples/axes_grid/simple_anchored_artists.txt
deleted file mode 100644
index bac27d32edd..00000000000
--- a/_sources/examples/axes_grid/simple_anchored_artists.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-.. _axes_grid-simple_anchored_artists:
-
-axes_grid example code: simple_anchored_artists.py
-==================================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/simple_anchored_artists.py
-
-::
-
- import matplotlib.pyplot as plt
-
-
- def draw_text(ax):
- from mpl_toolkits.axes_grid1.anchored_artists import AnchoredText
- at = AnchoredText("Figure 1a",
- loc=2, prop=dict(size=8), frameon=True,
- )
- at.patch.set_boxstyle("round,pad=0.,rounding_size=0.2")
- ax.add_artist(at)
-
- at2 = AnchoredText("Figure 1(b)",
- loc=3, prop=dict(size=8), frameon=True,
- bbox_to_anchor=(0., 1.),
- bbox_transform=ax.transAxes
- )
- at2.patch.set_boxstyle("round,pad=0.,rounding_size=0.2")
- ax.add_artist(at2)
-
-
- def draw_circle(ax): # circle in the canvas coordinate
- from mpl_toolkits.axes_grid1.anchored_artists import AnchoredDrawingArea
- from matplotlib.patches import Circle
- ada = AnchoredDrawingArea(20, 20, 0, 0,
- loc=1, pad=0., frameon=False)
- p = Circle((10, 10), 10)
- ada.da.add_artist(p)
- ax.add_artist(ada)
-
-
- def draw_ellipse(ax):
- from mpl_toolkits.axes_grid1.anchored_artists import AnchoredEllipse
- # draw an ellipse of width=0.1, height=0.15 in the data coordinate
- ae = AnchoredEllipse(ax.transData, width=0.1, height=0.15, angle=0.,
- loc=3, pad=0.5, borderpad=0.4, frameon=True)
-
- ax.add_artist(ae)
-
-
- def draw_sizebar(ax):
- from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar
- # draw a horizontal bar with length of 0.1 in Data coordinate
- # (ax.transData) with a label underneath.
- asb = AnchoredSizeBar(ax.transData,
- 0.1,
- r"1$^{\prime}$",
- loc=8,
- pad=0.1, borderpad=0.5, sep=5,
- frameon=False)
- ax.add_artist(asb)
-
-
- if 1:
- ax = plt.gca()
- ax.set_aspect(1.)
-
- draw_text(ax)
- draw_circle(ax)
- draw_ellipse(ax)
- draw_sizebar(ax)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/simple_axesgrid.rst.txt b/_sources/examples/axes_grid/simple_axesgrid.rst.txt
deleted file mode 100644
index 79c7c700824..00000000000
--- a/_sources/examples/axes_grid/simple_axesgrid.rst.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-.. _axes_grid-simple_axesgrid:
-
-axes_grid example code: simple_axesgrid.py
-==========================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/simple_axesgrid.py
-
-::
-
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1 import ImageGrid
- import numpy as np
-
- im = np.arange(100)
- im.shape = 10, 10
-
- fig = plt.figure(1, (4., 4.))
- grid = ImageGrid(fig, 111, # similar to subplot(111)
- nrows_ncols=(2, 2), # creates 2x2 grid of axes
- axes_pad=0.1, # pad between axes in inch.
- )
-
- for i in range(4):
- grid[i].imshow(im) # The AxesGrid object work as a list of axes.
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/simple_axesgrid.txt b/_sources/examples/axes_grid/simple_axesgrid.txt
deleted file mode 100644
index 881e7a2b5c2..00000000000
--- a/_sources/examples/axes_grid/simple_axesgrid.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-.. _axes_grid-simple_axesgrid:
-
-axes_grid example code: simple_axesgrid.py
-==========================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/simple_axesgrid.py
-
-::
-
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1 import ImageGrid
- import numpy as np
-
- im = np.arange(100)
- im.shape = 10, 10
-
- fig = plt.figure(1, (4., 4.))
- grid = ImageGrid(fig, 111, # similar to subplot(111)
- nrows_ncols=(2, 2), # creates 2x2 grid of axes
- axes_pad=0.1, # pad between axes in inch.
- )
-
- for i in range(4):
- grid[i].imshow(im) # The AxesGrid object work as a list of axes.
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/simple_axesgrid2.rst.txt b/_sources/examples/axes_grid/simple_axesgrid2.rst.txt
deleted file mode 100644
index b91b0daa79d..00000000000
--- a/_sources/examples/axes_grid/simple_axesgrid2.rst.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-.. _axes_grid-simple_axesgrid2:
-
-axes_grid example code: simple_axesgrid2.py
-===========================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/simple_axesgrid2.py
-
-::
-
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1 import ImageGrid
-
-
- def get_demo_image():
- import numpy as np
- from matplotlib.cbook import get_sample_data
- f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False)
- z = np.load(f)
- # z is a numpy array of 15x15
- return z, (-3, 4, -4, 3)
-
- F = plt.figure(1, (5.5, 3.5))
- grid = ImageGrid(F, 111, # similar to subplot(111)
- nrows_ncols=(1, 3),
- axes_pad=0.1,
- add_all=True,
- label_mode="L",
- )
-
- Z, extent = get_demo_image() # demo image
-
- im1 = Z
- im2 = Z[:, :10]
- im3 = Z[:, 10:]
- vmin, vmax = Z.min(), Z.max()
- for i, im in enumerate([im1, im2, im3]):
- ax = grid[i]
- ax.imshow(im, origin="lower", vmin=vmin,
- vmax=vmax, interpolation="nearest")
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/simple_axesgrid2.txt b/_sources/examples/axes_grid/simple_axesgrid2.txt
deleted file mode 100644
index 64411c08992..00000000000
--- a/_sources/examples/axes_grid/simple_axesgrid2.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-.. _axes_grid-simple_axesgrid2:
-
-axes_grid example code: simple_axesgrid2.py
-===========================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/simple_axesgrid2.py
-
-::
-
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1 import ImageGrid
-
-
- def get_demo_image():
- import numpy as np
- from matplotlib.cbook import get_sample_data
- f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False)
- z = np.load(f)
- # z is a numpy array of 15x15
- return z, (-3, 4, -4, 3)
-
- F = plt.figure(1, (5.5, 3.5))
- grid = ImageGrid(F, 111, # similar to subplot(111)
- nrows_ncols=(1, 3),
- axes_pad=0.1,
- add_all=True,
- label_mode="L",
- )
-
- Z, extent = get_demo_image() # demo image
-
- im1 = Z
- im2 = Z[:, :10]
- im3 = Z[:, 10:]
- vmin, vmax = Z.min(), Z.max()
- for i, im in enumerate([im1, im2, im3]):
- ax = grid[i]
- ax.imshow(im, origin="lower", vmin=vmin,
- vmax=vmax, interpolation="nearest")
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/simple_axisline4.rst.txt b/_sources/examples/axes_grid/simple_axisline4.rst.txt
deleted file mode 100644
index 5763fafb3ec..00000000000
--- a/_sources/examples/axes_grid/simple_axisline4.rst.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-.. _axes_grid-simple_axisline4:
-
-axes_grid example code: simple_axisline4.py
-===========================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/axes_grid/simple_axisline4.py
-
-::
-
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1 import host_subplot
- import mpl_toolkits.axisartist as AA
- import numpy as np
-
- ax = host_subplot(111, axes_class=AA.Axes)
- xx = np.arange(0, 2*np.pi, 0.01)
- ax.plot(xx, np.sin(xx))
-
- ax2 = ax.twin() # ax2 is responsible for "top" axis and "right" axis
- ax2.set_xticks([0., .5*np.pi, np.pi, 1.5*np.pi, 2*np.pi])
- ax2.set_xticklabels(["$0$", r"$\frac{1}{2}\pi$",
- r"$\pi$", r"$\frac{3}{2}\pi$", r"$2\pi$"])
-
- ax2.axis["right"].major_ticklabels.set_visible(False)
- ax2.axis["top"].major_ticklabels.set_visible(True)
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/axes_grid/simple_axisline4.txt b/_sources/examples/axes_grid/simple_axisline4.txt
deleted file mode 100644
index 7b210239db5..00000000000
--- a/_sources/examples/axes_grid/simple_axisline4.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-.. _axes_grid-simple_axisline4:
-
-axes_grid example code: simple_axisline4.py
-===========================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/axes_grid/simple_axisline4.py
-
-::
-
- import matplotlib.pyplot as plt
- from mpl_toolkits.axes_grid1 import host_subplot
- import mpl_toolkits.axisartist as AA
- import numpy as np
-
- ax = host_subplot(111, axes_class=AA.Axes)
- xx = np.arange(0, 2*np.pi, 0.01)
- ax.plot(xx, np.sin(xx))
-
- ax2 = ax.twin() # ax2 is responsible for "top" axis and "right" axis
- ax2.set_xticks([0., .5*np.pi, np.pi, 1.5*np.pi, 2*np.pi])
- ax2.set_xticklabels(["$0$", r"$\frac{1}{2}\pi$",
- r"$\pi$", r"$\frac{3}{2}\pi$", r"$2\pi$"])
-
- ax2.axis["right"].major_ticklabels.set_visible(False)
-
- plt.draw()
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/color/color_cycle_default.rst.txt b/_sources/examples/color/color_cycle_default.rst.txt
deleted file mode 100644
index de0379feb10..00000000000
--- a/_sources/examples/color/color_cycle_default.rst.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-.. _color-color_cycle_default:
-
-color example code: color_cycle_default.py
-==========================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/color/color_cycle_default.py
-
-::
-
- """
- ====================================
- Colors in the default property cycle
- ====================================
-
- Display the colors from the default prop_cycle.
- """
- import numpy as np
- import matplotlib.pyplot as plt
-
-
- prop_cycle = plt.rcParams['axes.prop_cycle']
- colors = prop_cycle.by_key()['color']
-
- lwbase = plt.rcParams['lines.linewidth']
- thin = float('%.1f' % (lwbase / 2))
- thick = lwbase * 3
-
- fig, axs = plt.subplots(nrows=2, ncols=2, sharex=True, sharey=True)
- for icol in range(2):
- if icol == 0:
- lwx, lwy = thin, lwbase
- else:
- lwx, lwy = lwbase, thick
- for irow in range(2):
- for i, color in enumerate(colors):
- axs[irow, icol].axhline(i, color=color, lw=lwx)
- axs[irow, icol].axvline(i, color=color, lw=lwy)
-
- axs[1, icol].set_facecolor('k')
- axs[1, icol].xaxis.set_ticks(np.arange(0, 10, 2))
- axs[0, icol].set_title('line widths (pts): %.1f, %.1f' % (lwx, lwy),
- fontsize='medium')
-
- for irow in range(2):
- axs[irow, 0].yaxis.set_ticks(np.arange(0, 10, 2))
-
- fig.suptitle('Colors in the default prop_cycle', fontsize='large')
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/color/color_cycle_demo.rst.txt b/_sources/examples/color/color_cycle_demo.rst.txt
deleted file mode 100644
index 3d27ad70d74..00000000000
--- a/_sources/examples/color/color_cycle_demo.rst.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-.. _color-color_cycle_demo:
-
-color example code: color_cycle_demo.py
-=======================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/color/color_cycle_demo.py
-
-::
-
- """
- ===================
- Styling with cycler
- ===================
-
- Demo of custom property-cycle settings to control colors and other style
- properties for multi-line plots.
-
- This example demonstrates two different APIs:
-
- 1. Setting the default rc parameter specifying the property cycle.
- This affects all subsequent axes (but not axes already created).
- 2. Setting the property cycle for a single pair of axes.
- """
- from cycler import cycler
- import numpy as np
- import matplotlib.pyplot as plt
-
-
- x = np.linspace(0, 2 * np.pi)
- offsets = np.linspace(0, 2*np.pi, 4, endpoint=False)
- # Create array with shifted-sine curve along each column
- yy = np.transpose([np.sin(x + phi) for phi in offsets])
-
- # 1. Setting prop cycle on default rc parameter
- plt.rc('lines', linewidth=4)
- plt.rc('axes', prop_cycle=(cycler('color', ['r', 'g', 'b', 'y']) +
- cycler('linestyle', ['-', '--', ':', '-.'])))
- fig, (ax0, ax1) = plt.subplots(nrows=2)
- ax0.plot(yy)
- ax0.set_title('Set default color cycle to rgby')
-
- # 2. Define prop cycle for single set of axes
- ax1.set_prop_cycle(cycler('color', ['c', 'm', 'y', 'k']) +
- cycler('lw', [1, 2, 3, 4]))
- ax1.plot(yy)
- ax1.set_title('Set axes color cycle to cmyk')
-
- # Tweak spacing between subplots to prevent labels from overlapping
- fig.subplots_adjust(hspace=0.3)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/color/color_cycle_demo.txt b/_sources/examples/color/color_cycle_demo.txt
deleted file mode 100644
index b0b67559e33..00000000000
--- a/_sources/examples/color/color_cycle_demo.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-.. _color-color_cycle_demo:
-
-color example code: color_cycle_demo.py
-=======================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/color/color_cycle_demo.py
-
-::
-
- """
- Demo of custom property-cycle settings to control colors and such
- for multi-line plots.
-
- This example demonstrates two different APIs:
-
- 1. Setting the default rc-parameter specifying the property cycle.
- This affects all subsequent axes (but not axes already created).
- 2. Setting the property cycle for a specific axes. This only
- affects a single axes.
- """
- from cycler import cycler
- import numpy as np
- import matplotlib.pyplot as plt
-
- x = np.linspace(0, 2 * np.pi)
- offsets = np.linspace(0, 2*np.pi, 4, endpoint=False)
- # Create array with shifted-sine curve along each column
- yy = np.transpose([np.sin(x + phi) for phi in offsets])
-
- plt.rc('lines', linewidth=4)
- plt.rc('axes', prop_cycle=(cycler('color', ['r', 'g', 'b', 'y']) +
- cycler('linestyle', ['-', '--', ':', '-.'])))
- fig, (ax0, ax1) = plt.subplots(nrows=2)
- ax0.plot(yy)
- ax0.set_title('Set default color cycle to rgby')
-
- ax1.set_prop_cycle(cycler('color', ['c', 'm', 'y', 'k']) +
- cycler('lw', [1, 2, 3, 4]))
- ax1.plot(yy)
- ax1.set_title('Set axes color cycle to cmyk')
-
- # Tweak spacing between subplots to prevent labels from overlapping
- plt.subplots_adjust(hspace=0.3)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/color/colormaps_reference.rst.txt b/_sources/examples/color/colormaps_reference.rst.txt
deleted file mode 100644
index 6cd01984ed9..00000000000
--- a/_sources/examples/color/colormaps_reference.rst.txt
+++ /dev/null
@@ -1,107 +0,0 @@
-.. _color-colormaps_reference:
-
-color example code: colormaps_reference.py
-==========================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/color/colormaps_reference.py
-
-::
-
- """
- ==================
- Colormap reference
- ==================
-
- Reference for colormaps included with Matplotlib.
-
- This reference example shows all colormaps included with Matplotlib. Note that
- any colormap listed here can be reversed by appending "_r" (e.g., "pink_r").
- These colormaps are divided into the following categories:
-
- Sequential:
- These colormaps are approximately monochromatic colormaps varying smoothly
- between two color tones---usually from low saturation (e.g. white) to high
- saturation (e.g. a bright blue). Sequential colormaps are ideal for
- representing most scientific data since they show a clear progression from
- low-to-high values.
-
- Diverging:
- These colormaps have a median value (usually light in color) and vary
- smoothly to two different color tones at high and low values. Diverging
- colormaps are ideal when your data has a median value that is significant
- (e.g. 0, such that positive and negative values are represented by
- different colors of the colormap).
-
- Qualitative:
- These colormaps vary rapidly in color. Qualitative colormaps are useful for
- choosing a set of discrete colors. For example::
-
- color_list = plt.cm.Set3(np.linspace(0, 1, 12))
-
- gives a list of RGB colors that are good for plotting a series of lines on
- a dark background.
-
- Miscellaneous:
- Colormaps that don't fit into the categories above.
-
- """
- import numpy as np
- import matplotlib.pyplot as plt
-
-
- # Have colormaps separated into categories:
- # http://matplotlib.org/examples/color/colormaps_reference.html
- cmaps = [('Perceptually Uniform Sequential', [
- 'viridis', 'plasma', 'inferno', 'magma']),
- ('Sequential', [
- 'Greys', 'Purples', 'Blues', 'Greens', 'Oranges', 'Reds',
- 'YlOrBr', 'YlOrRd', 'OrRd', 'PuRd', 'RdPu', 'BuPu',
- 'GnBu', 'PuBu', 'YlGnBu', 'PuBuGn', 'BuGn', 'YlGn']),
- ('Sequential (2)', [
- 'binary', 'gist_yarg', 'gist_gray', 'gray', 'bone', 'pink',
- 'spring', 'summer', 'autumn', 'winter', 'cool', 'Wistia',
- 'hot', 'afmhot', 'gist_heat', 'copper']),
- ('Diverging', [
- 'PiYG', 'PRGn', 'BrBG', 'PuOr', 'RdGy', 'RdBu',
- 'RdYlBu', 'RdYlGn', 'Spectral', 'coolwarm', 'bwr', 'seismic']),
- ('Qualitative', [
- 'Pastel1', 'Pastel2', 'Paired', 'Accent',
- 'Dark2', 'Set1', 'Set2', 'Set3',
- 'tab10', 'tab20', 'tab20b', 'tab20c']),
- ('Miscellaneous', [
- 'flag', 'prism', 'ocean', 'gist_earth', 'terrain', 'gist_stern',
- 'gnuplot', 'gnuplot2', 'CMRmap', 'cubehelix', 'brg', 'hsv',
- 'gist_rainbow', 'rainbow', 'jet', 'nipy_spectral', 'gist_ncar'])]
-
-
- nrows = max(len(cmap_list) for cmap_category, cmap_list in cmaps)
- gradient = np.linspace(0, 1, 256)
- gradient = np.vstack((gradient, gradient))
-
-
- def plot_color_gradients(cmap_category, cmap_list, nrows):
- fig, axes = plt.subplots(nrows=nrows)
- fig.subplots_adjust(top=0.95, bottom=0.01, left=0.2, right=0.99)
- axes[0].set_title(cmap_category + ' colormaps', fontsize=14)
-
- for ax, name in zip(axes, cmap_list):
- ax.imshow(gradient, aspect='auto', cmap=plt.get_cmap(name))
- pos = list(ax.get_position().bounds)
- x_text = pos[0] - 0.01
- y_text = pos[1] + pos[3]/2.
- fig.text(x_text, y_text, name, va='center', ha='right', fontsize=10)
-
- # Turn off *all* ticks & spines, not just the ones with colormaps.
- for ax in axes:
- ax.set_axis_off()
-
-
- for cmap_category, cmap_list in cmaps:
- plot_color_gradients(cmap_category, cmap_list, nrows)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/color/colormaps_reference.txt b/_sources/examples/color/colormaps_reference.txt
deleted file mode 100644
index 958109deca5..00000000000
--- a/_sources/examples/color/colormaps_reference.txt
+++ /dev/null
@@ -1,100 +0,0 @@
-.. _color-colormaps_reference:
-
-color example code: colormaps_reference.py
-==========================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/color/colormaps_reference.py
-
-::
-
- """
- Reference for colormaps included with Matplotlib.
-
- This reference example shows all colormaps included with Matplotlib. Note that
- any colormap listed here can be reversed by appending "_r" (e.g., "pink_r").
- These colormaps are divided into the following categories:
-
- Sequential:
- These colormaps are approximately monochromatic colormaps varying smoothly
- between two color tones---usually from low saturation (e.g. white) to high
- saturation (e.g. a bright blue). Sequential colormaps are ideal for
- representing most scientific data since they show a clear progression from
- low-to-high values.
-
- Diverging:
- These colormaps have a median value (usually light in color) and vary
- smoothly to two different color tones at high and low values. Diverging
- colormaps are ideal when your data has a median value that is significant
- (e.g. 0, such that positive and negative values are represented by
- different colors of the colormap).
-
- Qualitative:
- These colormaps vary rapidly in color. Qualitative colormaps are useful for
- choosing a set of discrete colors. For example::
-
- color_list = plt.cm.Set3(np.linspace(0, 1, 12))
-
- gives a list of RGB colors that are good for plotting a series of lines on
- a dark background.
-
- Miscellaneous:
- Colormaps that don't fit into the categories above.
-
- """
- import numpy as np
- import matplotlib.pyplot as plt
-
- # Have colormaps separated into categories:
- # http://matplotlib.org/examples/color/colormaps_reference.html
-
- cmaps = [('Perceptually Uniform Sequential',
- ['viridis', 'inferno', 'plasma', 'magma']),
- ('Sequential', ['Blues', 'BuGn', 'BuPu',
- 'GnBu', 'Greens', 'Greys', 'Oranges', 'OrRd',
- 'PuBu', 'PuBuGn', 'PuRd', 'Purples', 'RdPu',
- 'Reds', 'YlGn', 'YlGnBu', 'YlOrBr', 'YlOrRd']),
- ('Sequential (2)', ['afmhot', 'autumn', 'bone', 'cool',
- 'copper', 'gist_heat', 'gray', 'hot',
- 'pink', 'spring', 'summer', 'winter']),
- ('Diverging', ['BrBG', 'bwr', 'coolwarm', 'PiYG', 'PRGn', 'PuOr',
- 'RdBu', 'RdGy', 'RdYlBu', 'RdYlGn', 'Spectral',
- 'seismic']),
- ('Qualitative', ['Accent', 'Dark2', 'Paired', 'Pastel1',
- 'Pastel2', 'Set1', 'Set2', 'Set3']),
- ('Miscellaneous', ['gist_earth', 'terrain', 'ocean', 'gist_stern',
- 'brg', 'CMRmap', 'cubehelix',
- 'gnuplot', 'gnuplot2', 'gist_ncar',
- 'nipy_spectral', 'jet', 'rainbow',
- 'gist_rainbow', 'hsv', 'flag', 'prism'])]
-
-
- nrows = max(len(cmap_list) for cmap_category, cmap_list in cmaps)
- gradient = np.linspace(0, 1, 256)
- gradient = np.vstack((gradient, gradient))
-
-
- def plot_color_gradients(cmap_category, cmap_list):
- fig, axes = plt.subplots(nrows=nrows)
- fig.subplots_adjust(top=0.95, bottom=0.01, left=0.2, right=0.99)
- axes[0].set_title(cmap_category + ' colormaps', fontsize=14)
-
- for ax, name in zip(axes, cmap_list):
- ax.imshow(gradient, aspect='auto', cmap=plt.get_cmap(name))
- pos = list(ax.get_position().bounds)
- x_text = pos[0] - 0.01
- y_text = pos[1] + pos[3]/2.
- fig.text(x_text, y_text, name, va='center', ha='right', fontsize=10)
-
- # Turn off *all* ticks & spines, not just the ones with colormaps.
- for ax in axes:
- ax.set_axis_off()
-
- for cmap_category, cmap_list in cmaps:
- plot_color_gradients(cmap_category, cmap_list)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/color/index.rst.txt b/_sources/examples/color/index.rst.txt
deleted file mode 100644
index 873efd89607..00000000000
--- a/_sources/examples/color/index.rst.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-.. _color-examples-index:
-
-##############################################
-color Examples
-##############################################
-
-.. htmlonly::
-
- :Release: |version|
- :Date: |today|
-
-.. toctree::
- :maxdepth: 1
-
- color_cycle_default
- color_cycle_demo
- colormaps_reference
- named_colors
diff --git a/_sources/examples/color/index.txt b/_sources/examples/color/index.txt
deleted file mode 100644
index de1201c38c7..00000000000
--- a/_sources/examples/color/index.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-.. _color-examples-index:
-
-##############################################
-color Examples
-##############################################
-
-.. htmlonly::
-
- :Release: |version|
- :Date: |today|
-
-.. toctree::
- :maxdepth: 1
-
- color_cycle_demo
- colormaps_reference
- named_colors
diff --git a/_sources/examples/color/named_colors.rst.txt b/_sources/examples/color/named_colors.rst.txt
deleted file mode 100644
index 17983ffb678..00000000000
--- a/_sources/examples/color/named_colors.rst.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-.. _color-named_colors:
-
-color example code: named_colors.py
-===================================
-
-
-
-.. plot:: /home/tcaswell/src/p/matplotlib/doc/mpl_examples/color/named_colors.py
-
-::
-
- """
- ========================
- Visualizing named colors
- ========================
-
- Simple plot example with the named colors and its visual representation.
- """
- from __future__ import division
-
- import matplotlib.pyplot as plt
- from matplotlib import colors as mcolors
-
-
- colors = dict(mcolors.BASE_COLORS, **mcolors.CSS4_COLORS)
-
- # Sort colors by hue, saturation, value and name.
- by_hsv = sorted((tuple(mcolors.rgb_to_hsv(mcolors.to_rgba(color)[:3])), name)
- for name, color in colors.items())
- sorted_names = [name for hsv, name in by_hsv]
-
- n = len(sorted_names)
- ncols = 4
- nrows = n // ncols + 1
-
- fig, ax = plt.subplots(figsize=(8, 5))
-
- # Get height and width
- X, Y = fig.get_dpi() * fig.get_size_inches()
- h = Y / (nrows + 1)
- w = X / ncols
-
- for i, name in enumerate(sorted_names):
- col = i % ncols
- row = i // ncols
- y = Y - (row * h) - h
-
- xi_line = w * (col + 0.05)
- xf_line = w * (col + 0.25)
- xi_text = w * (col + 0.3)
-
- ax.text(xi_text, y, name, fontsize=(h * 0.8),
- horizontalalignment='left',
- verticalalignment='center')
-
- ax.hlines(y + h * 0.1, xi_line, xf_line,
- color=colors[name], linewidth=(h * 0.6))
-
- ax.set_xlim(0, X)
- ax.set_ylim(0, Y)
- ax.set_axis_off()
-
- fig.subplots_adjust(left=0, right=1,
- top=1, bottom=0,
- hspace=0, wspace=0)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/color/named_colors.txt b/_sources/examples/color/named_colors.txt
deleted file mode 100644
index db721b935b0..00000000000
--- a/_sources/examples/color/named_colors.txt
+++ /dev/null
@@ -1,92 +0,0 @@
-.. _color-named_colors:
-
-color example code: named_colors.py
-===================================
-
-
-
-.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/color/named_colors.py
-
-::
-
- """
- Visualization of named colors.
-
- Simple plot example with the named colors and its visual representation.
- """
-
- from __future__ import (absolute_import, division, print_function,
- unicode_literals)
-
- import six
-
- import numpy as np
- import matplotlib.pyplot as plt
- from matplotlib import colors
-
-
- colors_ = list(six.iteritems(colors.cnames))
-
- # Add the single letter colors.
- for name, rgb in six.iteritems(colors.ColorConverter.colors):
- hex_ = colors.rgb2hex(rgb)
- colors_.append((name, hex_))
-
- # Transform to hex color values.
- hex_ = [color[1] for color in colors_]
- # Get the rgb equivalent.
- rgb = [colors.hex2color(color) for color in hex_]
- # Get the hsv equivalent.
- hsv = [colors.rgb_to_hsv(color) for color in rgb]
-
- # Split the hsv values to sort.
- hue = [color[0] for color in hsv]
- sat = [color[1] for color in hsv]
- val = [color[2] for color in hsv]
-
- # Sort by hue, saturation and value.
- ind = np.lexsort((val, sat, hue))
- sorted_colors = [colors_[i] for i in ind]
-
- n = len(sorted_colors)
- ncols = 4
- nrows = int(np.ceil(1. * n / ncols))
-
- fig, ax = plt.subplots()
-
- X, Y = fig.get_dpi() * fig.get_size_inches()
-
- # row height
- h = Y / (nrows + 1)
- # col width
- w = X / ncols
-
- for i, (name, color) in enumerate(sorted_colors):
- col = i % ncols
- row = int(i / ncols)
- y = Y - (row * h) - h
-
- xi_line = w * (col + 0.05)
- xf_line = w * (col + 0.25)
- xi_text = w * (col + 0.3)
-
- ax.text(xi_text, y, name, fontsize=(h * 0.8),
- horizontalalignment='left',
- verticalalignment='center')
-
- # Add extra black line a little bit thicker to make
- # clear colors more visible.
- ax.hlines(y, xi_line, xf_line, color='black', linewidth=(h * 0.7))
- ax.hlines(y + h * 0.1, xi_line, xf_line, color=color, linewidth=(h * 0.6))
-
- ax.set_xlim(0, X)
- ax.set_ylim(0, Y)
- ax.set_axis_off()
-
- fig.subplots_adjust(left=0, right=1,
- top=1, bottom=0,
- hspace=0, wspace=0)
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/event_handling/close_event.rst.txt b/_sources/examples/event_handling/close_event.rst.txt
deleted file mode 100644
index 257e14f0f04..00000000000
--- a/_sources/examples/event_handling/close_event.rst.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-.. _event_handling-close_event:
-
-event_handling example code: close_event.py
-===========================================
-
-[`source code `_]
-
-::
-
- from __future__ import print_function
- import matplotlib.pyplot as plt
-
-
- def handle_close(evt):
- print('Closed Figure!')
-
- fig = plt.figure()
- fig.canvas.mpl_connect('close_event', handle_close)
-
- plt.text(0.35, 0.5, 'Close Me!', dict(size=30))
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/event_handling/close_event.txt b/_sources/examples/event_handling/close_event.txt
deleted file mode 100644
index 257e14f0f04..00000000000
--- a/_sources/examples/event_handling/close_event.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-.. _event_handling-close_event:
-
-event_handling example code: close_event.py
-===========================================
-
-[`source code `_]
-
-::
-
- from __future__ import print_function
- import matplotlib.pyplot as plt
-
-
- def handle_close(evt):
- print('Closed Figure!')
-
- fig = plt.figure()
- fig.canvas.mpl_connect('close_event', handle_close)
-
- plt.text(0.35, 0.5, 'Close Me!', dict(size=30))
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/event_handling/data_browser.rst.txt b/_sources/examples/event_handling/data_browser.rst.txt
deleted file mode 100644
index 932b4f1fbf4..00000000000
--- a/_sources/examples/event_handling/data_browser.rst.txt
+++ /dev/null
@@ -1,100 +0,0 @@
-.. _event_handling-data_browser:
-
-event_handling example code: data_browser.py
-============================================
-
-[`source code `_]
-
-::
-
- import numpy as np
-
-
- class PointBrowser(object):
- """
- Click on a point to select and highlight it -- the data that
- generated the point will be shown in the lower axes. Use the 'n'
- and 'p' keys to browse through the next and previous points
- """
-
- def __init__(self):
- self.lastind = 0
-
- self.text = ax.text(0.05, 0.95, 'selected: none',
- transform=ax.transAxes, va='top')
- self.selected, = ax.plot([xs[0]], [ys[0]], 'o', ms=12, alpha=0.4,
- color='yellow', visible=False)
-
- def onpress(self, event):
- if self.lastind is None:
- return
- if event.key not in ('n', 'p'):
- return
- if event.key == 'n':
- inc = 1
- else:
- inc = -1
-
- self.lastind += inc
- self.lastind = np.clip(self.lastind, 0, len(xs) - 1)
- self.update()
-
- def onpick(self, event):
-
- if event.artist != line:
- return True
-
- N = len(event.ind)
- if not N:
- return True
-
- # the click locations
- x = event.mouseevent.xdata
- y = event.mouseevent.ydata
-
- distances = np.hypot(x - xs[event.ind], y - ys[event.ind])
- indmin = distances.argmin()
- dataind = event.ind[indmin]
-
- self.lastind = dataind
- self.update()
-
- def update(self):
- if self.lastind is None:
- return
-
- dataind = self.lastind
-
- ax2.cla()
- ax2.plot(X[dataind])
-
- ax2.text(0.05, 0.9, 'mu=%1.3f\nsigma=%1.3f' % (xs[dataind], ys[dataind]),
- transform=ax2.transAxes, va='top')
- ax2.set_ylim(-0.5, 1.5)
- self.selected.set_visible(True)
- self.selected.set_data(xs[dataind], ys[dataind])
-
- self.text.set_text('selected: %d' % dataind)
- fig.canvas.draw()
-
-
- if __name__ == '__main__':
- import matplotlib.pyplot as plt
-
- X = np.random.rand(100, 200)
- xs = np.mean(X, axis=1)
- ys = np.std(X, axis=1)
-
- fig, (ax, ax2) = plt.subplots(2, 1)
- ax.set_title('click on point to plot time series')
- line, = ax.plot(xs, ys, 'o', picker=5) # 5 points tolerance
-
- browser = PointBrowser()
-
- fig.canvas.mpl_connect('pick_event', browser.onpick)
- fig.canvas.mpl_connect('key_press_event', browser.onpress)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/event_handling/data_browser.txt b/_sources/examples/event_handling/data_browser.txt
deleted file mode 100644
index 932b4f1fbf4..00000000000
--- a/_sources/examples/event_handling/data_browser.txt
+++ /dev/null
@@ -1,100 +0,0 @@
-.. _event_handling-data_browser:
-
-event_handling example code: data_browser.py
-============================================
-
-[`source code `_]
-
-::
-
- import numpy as np
-
-
- class PointBrowser(object):
- """
- Click on a point to select and highlight it -- the data that
- generated the point will be shown in the lower axes. Use the 'n'
- and 'p' keys to browse through the next and previous points
- """
-
- def __init__(self):
- self.lastind = 0
-
- self.text = ax.text(0.05, 0.95, 'selected: none',
- transform=ax.transAxes, va='top')
- self.selected, = ax.plot([xs[0]], [ys[0]], 'o', ms=12, alpha=0.4,
- color='yellow', visible=False)
-
- def onpress(self, event):
- if self.lastind is None:
- return
- if event.key not in ('n', 'p'):
- return
- if event.key == 'n':
- inc = 1
- else:
- inc = -1
-
- self.lastind += inc
- self.lastind = np.clip(self.lastind, 0, len(xs) - 1)
- self.update()
-
- def onpick(self, event):
-
- if event.artist != line:
- return True
-
- N = len(event.ind)
- if not N:
- return True
-
- # the click locations
- x = event.mouseevent.xdata
- y = event.mouseevent.ydata
-
- distances = np.hypot(x - xs[event.ind], y - ys[event.ind])
- indmin = distances.argmin()
- dataind = event.ind[indmin]
-
- self.lastind = dataind
- self.update()
-
- def update(self):
- if self.lastind is None:
- return
-
- dataind = self.lastind
-
- ax2.cla()
- ax2.plot(X[dataind])
-
- ax2.text(0.05, 0.9, 'mu=%1.3f\nsigma=%1.3f' % (xs[dataind], ys[dataind]),
- transform=ax2.transAxes, va='top')
- ax2.set_ylim(-0.5, 1.5)
- self.selected.set_visible(True)
- self.selected.set_data(xs[dataind], ys[dataind])
-
- self.text.set_text('selected: %d' % dataind)
- fig.canvas.draw()
-
-
- if __name__ == '__main__':
- import matplotlib.pyplot as plt
-
- X = np.random.rand(100, 200)
- xs = np.mean(X, axis=1)
- ys = np.std(X, axis=1)
-
- fig, (ax, ax2) = plt.subplots(2, 1)
- ax.set_title('click on point to plot time series')
- line, = ax.plot(xs, ys, 'o', picker=5) # 5 points tolerance
-
- browser = PointBrowser()
-
- fig.canvas.mpl_connect('pick_event', browser.onpick)
- fig.canvas.mpl_connect('key_press_event', browser.onpress)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/event_handling/figure_axes_enter_leave.rst.txt b/_sources/examples/event_handling/figure_axes_enter_leave.rst.txt
deleted file mode 100644
index c8fa6d8a31d..00000000000
--- a/_sources/examples/event_handling/figure_axes_enter_leave.rst.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-.. _event_handling-figure_axes_enter_leave:
-
-event_handling example code: figure_axes_enter_leave.py
-=======================================================
-
-[`source code `_]
-
-::
-
- """
- Illustrate the figure and axes enter and leave events by changing the
- frame colors on enter and leave
- """
- from __future__ import print_function
- import matplotlib.pyplot as plt
-
-
- def enter_axes(event):
- print('enter_axes', event.inaxes)
- event.inaxes.patch.set_facecolor('yellow')
- event.canvas.draw()
-
-
- def leave_axes(event):
- print('leave_axes', event.inaxes)
- event.inaxes.patch.set_facecolor('white')
- event.canvas.draw()
-
-
- def enter_figure(event):
- print('enter_figure', event.canvas.figure)
- event.canvas.figure.patch.set_facecolor('red')
- event.canvas.draw()
-
-
- def leave_figure(event):
- print('leave_figure', event.canvas.figure)
- event.canvas.figure.patch.set_facecolor('grey')
- event.canvas.draw()
-
- fig1, (ax, ax2) = plt.subplots(2, 1)
- fig1.suptitle('mouse hover over figure or axes to trigger events')
-
- fig1.canvas.mpl_connect('figure_enter_event', enter_figure)
- fig1.canvas.mpl_connect('figure_leave_event', leave_figure)
- fig1.canvas.mpl_connect('axes_enter_event', enter_axes)
- fig1.canvas.mpl_connect('axes_leave_event', leave_axes)
-
- fig2, (ax, ax2) = plt.subplots(2, 1)
- fig2.suptitle('mouse hover over figure or axes to trigger events')
-
- fig2.canvas.mpl_connect('figure_enter_event', enter_figure)
- fig2.canvas.mpl_connect('figure_leave_event', leave_figure)
- fig2.canvas.mpl_connect('axes_enter_event', enter_axes)
- fig2.canvas.mpl_connect('axes_leave_event', leave_axes)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/event_handling/figure_axes_enter_leave.txt b/_sources/examples/event_handling/figure_axes_enter_leave.txt
deleted file mode 100644
index c8fa6d8a31d..00000000000
--- a/_sources/examples/event_handling/figure_axes_enter_leave.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-.. _event_handling-figure_axes_enter_leave:
-
-event_handling example code: figure_axes_enter_leave.py
-=======================================================
-
-[`source code `_]
-
-::
-
- """
- Illustrate the figure and axes enter and leave events by changing the
- frame colors on enter and leave
- """
- from __future__ import print_function
- import matplotlib.pyplot as plt
-
-
- def enter_axes(event):
- print('enter_axes', event.inaxes)
- event.inaxes.patch.set_facecolor('yellow')
- event.canvas.draw()
-
-
- def leave_axes(event):
- print('leave_axes', event.inaxes)
- event.inaxes.patch.set_facecolor('white')
- event.canvas.draw()
-
-
- def enter_figure(event):
- print('enter_figure', event.canvas.figure)
- event.canvas.figure.patch.set_facecolor('red')
- event.canvas.draw()
-
-
- def leave_figure(event):
- print('leave_figure', event.canvas.figure)
- event.canvas.figure.patch.set_facecolor('grey')
- event.canvas.draw()
-
- fig1, (ax, ax2) = plt.subplots(2, 1)
- fig1.suptitle('mouse hover over figure or axes to trigger events')
-
- fig1.canvas.mpl_connect('figure_enter_event', enter_figure)
- fig1.canvas.mpl_connect('figure_leave_event', leave_figure)
- fig1.canvas.mpl_connect('axes_enter_event', enter_axes)
- fig1.canvas.mpl_connect('axes_leave_event', leave_axes)
-
- fig2, (ax, ax2) = plt.subplots(2, 1)
- fig2.suptitle('mouse hover over figure or axes to trigger events')
-
- fig2.canvas.mpl_connect('figure_enter_event', enter_figure)
- fig2.canvas.mpl_connect('figure_leave_event', leave_figure)
- fig2.canvas.mpl_connect('axes_enter_event', enter_axes)
- fig2.canvas.mpl_connect('axes_leave_event', leave_axes)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/event_handling/idle_and_timeout.rst.txt b/_sources/examples/event_handling/idle_and_timeout.rst.txt
deleted file mode 100644
index 4a1919e3295..00000000000
--- a/_sources/examples/event_handling/idle_and_timeout.rst.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-.. _event_handling-idle_and_timeout:
-
-event_handling example code: idle_and_timeout.py
-================================================
-
-[`source code `_]
-
-::
-
- from __future__ import print_function
- """
- Demonstrate/test the idle and timeout API
-
- WARNING: idle_event is deprecated. Use the animations module instead.
-
- This is only tested on gtk so far and is a prototype implementation
- """
- import numpy as np
- import matplotlib.pyplot as plt
-
- fig, ax = plt.subplots()
-
- t = np.arange(0.0, 2.0, 0.01)
- y1 = np.sin(2*np.pi*t)
- y2 = np.cos(2*np.pi*t)
- line1, = ax.plot(y1)
- line2, = ax.plot(y2)
-
- N = 100
-
-
- def on_idle(event):
- on_idle.count += 1
- print('idle', on_idle.count)
- line1.set_ydata(np.sin(2*np.pi*t*(N - on_idle.count)/float(N)))
- event.canvas.draw()
- # test boolean return removal
- if on_idle.count == N:
- return False
- return True
- on_idle.cid = None
- on_idle.count = 0
-
- fig.canvas.mpl_connect('idle_event', on_idle)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/event_handling/idle_and_timeout.txt b/_sources/examples/event_handling/idle_and_timeout.txt
deleted file mode 100644
index 4a1919e3295..00000000000
--- a/_sources/examples/event_handling/idle_and_timeout.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-.. _event_handling-idle_and_timeout:
-
-event_handling example code: idle_and_timeout.py
-================================================
-
-[`source code `_]
-
-::
-
- from __future__ import print_function
- """
- Demonstrate/test the idle and timeout API
-
- WARNING: idle_event is deprecated. Use the animations module instead.
-
- This is only tested on gtk so far and is a prototype implementation
- """
- import numpy as np
- import matplotlib.pyplot as plt
-
- fig, ax = plt.subplots()
-
- t = np.arange(0.0, 2.0, 0.01)
- y1 = np.sin(2*np.pi*t)
- y2 = np.cos(2*np.pi*t)
- line1, = ax.plot(y1)
- line2, = ax.plot(y2)
-
- N = 100
-
-
- def on_idle(event):
- on_idle.count += 1
- print('idle', on_idle.count)
- line1.set_ydata(np.sin(2*np.pi*t*(N - on_idle.count)/float(N)))
- event.canvas.draw()
- # test boolean return removal
- if on_idle.count == N:
- return False
- return True
- on_idle.cid = None
- on_idle.count = 0
-
- fig.canvas.mpl_connect('idle_event', on_idle)
-
- plt.show()
-
-
-Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)
\ No newline at end of file
diff --git a/_sources/examples/event_handling/index.rst.txt b/_sources/examples/event_handling/index.rst.txt
deleted file mode 100644
index 4ee81468451..00000000000
--- a/_sources/examples/event_handling/index.rst.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-.. _event_handling-examples-index:
-
-##############################################
-event_handling Examples
-##############################################
-
-.. htmlonly::
-
- :Release: |version|
- :Date: |today|
-
-.. toctree::
- :maxdepth: 1
-
- close_event
- data_browser
- figure_axes_enter_leave
- idle_and_timeout
- keypress_demo
- lasso_demo
- legend_picking
- looking_glass
- path_editor
- pick_event_demo
- pick_event_demo2
- pipong
- poly_editor
- pong_gtk
- resample
- test_mouseclicks
- timers
- trifinder_event_demo
- viewlims
- zoom_window
diff --git a/_sources/examples/event_handling/index.txt b/_sources/examples/event_handling/index.txt
deleted file mode 100644
index 4ee81468451..00000000000
--- a/_sources/examples/event_handling/index.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-.. _event_handling-examples-index:
-
-##############################################
-event_handling Examples
-##############################################
-
-.. htmlonly::
-
- :Release: |version|
- :Date: |today|
-
-.. toctree::
- :maxdepth: 1
-
- close_event
- data_browser
- figure_axes_enter_leave